2 차 커밋을 제거하려고합니다. 이 시점에서 난 그냥 .git
디렉토리를 날려하고 다시 수행하지만이 작업을 수행하는 방법에 궁금 수 ... 내가 삭제 한 이전 커밋,하지만 분명히 결코 2 일 :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.
#
내 문제 난 그냥이 2가
그 점은 전혀 다른 커밋을 추가하기 때문에 –
어떻게 달라질까요? 변경을 취소하려는 목표가 완료되었습니다. – bluesman
아직 푸시하지 않았기 때문에 "커밋", "이전 커밋 실행 취소"에 대한 요점은 실제로 보이지 않습니다. 당신의 대답은 _wrong_이 아닙니다, 저는 다른 사람들이 더 좋다고 생각합니다 : P –