git commit -m ""内容写错,如何重新编辑
某草草
某草草 2017-05-02 09:21:12
0
4
1028

已经 git commit -m "",但是备注内容写错了,如何修改备注的信息

某草草
某草草

reply all(4)
黄舟

You can edit it again: git commit --amend
Or reset it and start againgit reset --hard HEAD^

phpcn_u1582

git commit --amend

我想大声告诉你

commit provides a --amend parameter, which can modify the last submitted information

Ty80

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...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!