Git - edit last commit
Sunday, 18. October 2009, 17:12:16
Git is a wonderful SCM. We use svn centrally as our source code repository. I use git-svn to create my local copy. My typical workflow is:
There are times between step 3, and 4 when i want to edit my commit log message. Here are the steps i follow (shamelessly copied from here):
- Get updates from svn
$ git svn rebase
- Make changes.
- Commit changes locally
$ git commit -a
- Commit changes to svn
$ git svn dcommit
There are times between step 3, and 4 when i want to edit my commit log message. Here are the steps i follow (shamelessly copied from here):
- Soft reset the current HEAD to HEAD^
$ git reset --soft HEAD^
- Make changes to tree.
- Commit changes with editing last log message
$ git commit -c ORIG_HEAD
- Commit changes to svn
$ git svn dcommit


