How to change has pushed the commit comment information (How to change the pushed commit message)

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 ienter editing mode, modified good comment, press Esckey to exit edit mode, enter :wqto 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! ! !

 

Guess you like

Origin www.cnblogs.com/revel171226/p/11290837.html