code_junkie

How do I edit an incorrect commit message in git

Nov 11th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. git commit --amend
  2.  
  3. $ git reset --soft HEAD^
  4. $ ... do something else to come up with the right tree ...
  5. $ git commit -c ORIG_HEAD
  6.  
  7. git commit --amend -m "your new message"
  8.  
  9. git commit --amend
  10.  
  11. git commit --amend
  12.  
  13. git commit --amend
  14.  
  15. git commit --amend
  16.  
  17. git commit --amend
  18.  
  19. git reset --soft HEAD^
  20. git commit -a -c ORIG_HEAD
Add Comment
Please, Sign In to add comment