I have commited some change with git. Now I would like to change the commit text. Is there any possibility to do that? I am using eclipse git and gittortoise
Asked
Active
Viewed 2.4k times
3
-
7Possible duplicate of [Edit an incorrect commit message in Git](http://stackoverflow.com/questions/179123/edit-an-incorrect-commit-message-in-git) – ThomasThiebaud Feb 03 '16 at 09:31
-
2Use `git commit --amend` ... keep in mind this will _rewrite_ the HEAD of your branch, so when you push you will have to use `git push --force` – Tim Biegeleisen Feb 03 '16 at 09:34
-
why there is a java tag? – Arsaceus Feb 03 '16 at 09:54
1 Answers
12
you may use git commit --amend -m "message" or may do this which is fairly equivalent :
$ git reset --soft HEAD
$ ... do something else to come up with the right tree ...
$ git commit -c ORIG_HEAD

the_unknown_spirit
- 2,518
- 7
- 34
- 56