changing the last commit message without committing newest changes

Posted by Oleg2718281828 on Stack Overflow See other posts from Stack Overflow or by Oleg2718281828
Published on 2012-07-01T23:19:38Z Indexed on 2012/07/02 3:16 UTC
Read the original article Hit count: 198

Filed under:

My ideal workflow would consist of the following steps

  1. edit the code
  2. compile
  3. git commit -a -m "commit message"
  4. start running the new binaries, tests, etc. (may take 10+ minutes)
  5. start new changes, while the binaries are still running
  6. when step # 4 is finished, edit the commit message from step # 3, without committing the changes introduced in step # 5, by adding, say, "test FOO failed"

I cannot use git commit -a --amend -m "new commit message", because this commits the new changes as well. I'm not sure that I want to bother with staging or branching. I wish I could just edit the commit message without committing any new changes. Is it possible?

© Stack Overflow or respective owner

Related posts about git