1, modify the last comment (Modify the last comment message)
git commit -amend
2, before modifying Notes
1) Input:
git rebase -i HEAD~3
The final figure 3 refers to the penultimate times, three times the inverse of 3 comments such as this on a command input display
2) If you want to change which of the comment will need to pick which of the pre-edit comments into
Corresponding editor command: Enter i
enter editing mode, modified good comment, press Esc
key to exit edit mode, enter :wq
to save and exit.
3), then the next step :( Terminal will prompt)
git commit --amend
4), the revised comments, save and exit, enter:
git rebase --continue
If you have pushed the warehouse need to execute the following command:
git push --force origin master
Note: If you push someone before submitting a new code to the remote repository, and then you force the push, then you will be forced to update covering! ! !