git-am
http://blog.csdn.net/mliubing2532/article/details/7577905
git-rebase
http://blog.csdn.net/mliubing2532/article/details/7577843
http://blog.csdn.net/mliubing2532/article/details/7577849
2015年10月26日 星期一
2013年8月29日 星期四
2013年8月27日 星期二
2013年8月13日 星期二
How to undo the last Git commit?
http://git-scm.com/docs/git-reset
Undo a commit and redo
$ git commit ... (1)
$ git reset --soft HEAD^ (2)
$ edit (3)
$ git add .... (4)
$ git commit -c ORIG_HEAD (5)
This is what you want to undo
This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before "reset".
Make corrections to working tree files.
Stage changes for commit.
"reset" copies the old head to .git/ORIG_HEAD; redo the commit by starting with its log message. If you do not need to edit the message further, you can give -C option instead.
2013年8月6日 星期二
訂閱:
文章 (Atom)