黄舟2017-05-02 09:23:12
You can edit it again: git commit --amend
Or reset it and start againgit reset --hard HEAD^
我想大声告诉你2017-05-02 09:23:12
commit provides a --amend parameter, which can modify the last submitted information
PHP中文网2017-05-02 09:23:12
If you find after git commit that the commit information was written incorrectly or some files were forgotten to submit, and no push has been performed after the commit, you can use git commit --amend to modify this commit
git commit -m 'initial commit'
git add ./README.md
git commit --amend
The above three commands ultimately only produce one commit, and the second commit command modifies the content of the first commit.
http://git.oschina.net/progit/2-Git-%E5%9F%BA%E7%A1%80.html#2.4-%E6%92...