git 在 Eclipse/EGit 中有没有办法编辑未推送/本地提交的提交消息?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21475844/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
In Eclipse/EGit is there a way to edit commit message of unpushed/local commit?
提问by Grzegorz Oledzki
Using Eclipse/EGit how do I edit a commit message of a commit I've made locally, but haven't pushed to the repository yet?
使用 Eclipse/EGit 如何编辑我在本地进行但尚未推送到存储库的提交的提交消息?
回答by VonC
That would be the "Amending Commits" section of the EGit User Guide:
open the Staging View or Commit Dialog again and select the option Amend previous commit in the toolbar.
再次打开暂存视图或提交对话框,然后在工具栏中选择修改以前的提交选项。
See also this tutorial:
另请参阅本教程:
Git amend allows to adjust the last commit.
For example you can change the commit message.
The Git Staging view allows you to perform the Git amend command via the highlighted button in the following screenshot.
Git amend 允许调整最后一次提交。
例如,您可以更改提交消息。
Git 暂存视图允许您通过以下屏幕截图中突出显示的按钮执行 Git 修改命令。
See more about git commit --amend
in general at "The git commit --amend
Command".
查看更多关于git commit --amend
一般在“的git commit --amend
命令”。
99sonoadds in the comments:
I use:
Team Synchronizing Prespective
>History View
>Modify
(submenu) >Rework
.
Finally this opens a popup where I can edit the old commit message.
我用:
Team Synchronizing Prespective
>History View
>Modify
(子菜单)>Rework
.
最后这会打开一个弹出窗口,我可以在其中编辑旧的提交消息。
回答by softwarevamp
You can select the commit and right click, then:
您可以选择提交并右键单击,然后:
Modify -> Edit
to rebase onto that commit, amend it and then continue.
重新基于该提交,修改它然后继续。