Home » Git »

March 31st, 2011

Git undo commit terakhir

$ git reset --soft HEAD^              (1)
$ edit something here                 (2)
$ add files to using git add
$ git commit -c ORIG_HEAD       (3)

1 – 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”.
2 – Make corrections to working tree files.
3 – “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.

Posted in Git
By
read more
Forum Tutorial php,mysql,javascript,css,html bahasa melayu

Tutorial php,mysql,javascript,css,html bahasa melayu