2011年5月6日 星期五

Git: undo commit

You can undo previous commit without remove modified after commit.

git reset --soft HEAD~1

Or undo previous commit with remove modified after commit.

git reset --hard HEAD~1




You can remove your modification to lastest commit.

git reset --hard HEAD


沒有留言:

張貼留言