Git modifies commit information
①:git log
Check the commit log and find the commit to modify
②:git rebase -i HEAD~n
1. Switch to the commit that needs to be modified. n is the serial number of the commit. If you want to modify the latest commit message, use git rebase -i HEAD~1
2. Press i to enter edit mode
3. Change pick to edit, press ESC to exit edit mode, then enter: wq to save and exit VIM
③:git commit --amend
Press i to enter the editing mode, modify the content that needs to be modified, press ESC to exit the editing mode, and then enter: wq to save and exit VIM