2番目のコミットを削除しようとしています。この時点で、私はちょうど.git
ディレクトリを吹き飛ばすし、それを再実行するが、私はこれを行う方法を好奇心でした...私は削除したが前にコミットが、どうやら、決して第二1 :)git:2番目のコミットを削除する
> git log
commit c39019e4b08497406c53ceb532f99801793205ca
Author: Me
Date: Thu Mar 22 14:02:41 2012 -0700
Initializing registry directories
commit 535dce28f1c68e8af9d22bc653aca426fb7825d8
Author: Me
Date: Tue Jan 31 21:04:13 2012 -0800
First Commit
> git rebase -i HEAD~2
fatal: Needed a single revision
invalid upstream HEAD~2
> git rebase -i HEAD~1
はその時点で私は私のエディタで取得:
今pick c39019e Initializing registry directories
# Rebase 535dce2..c39019e onto 535dce2
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
私の問題は、私はちょうどこの第二は
これは無意識のうちに別のコミットを追加する –
どのように違いがありますか?変更を削除するというあなたの目標が完了しました。 – bluesman
私はまだプッシュしていなかったので、実際に "コミット"を押す際にポイントを見ないので、 "前回のコミットを元に戻す"。あなたの答えは_wrong_ではない、私は他の方が良いと思う:P –