[英]Magit - rename last commit
How do I rename the last commit in Magit (ie. edit the commit message) ? 如何重命名Magit中的最后一次提交(即编辑提交消息)?
I can see it in magit-log-buffer-file
, but I don't know how to interact with it. 我可以在
magit-log-buffer-file
看到它,但我不知道如何与它进行交互。
按c ( 提交 ),然后按 ( 修改 ),编辑消息, 抄送Cc ,获利!
There is a command called magit-commit-reword
in latest Magit(Current version:v2.13.0) 最新的Magit中有一个名为
magit-commit-reword
的命令(当前版本:v2.13.0)
Steps: 脚步:
c
(Commit) at commit. c
(提交)。 (I usually move cursor to the first line after typing magit-status
command) magit-status
命令后将光标移动到第一行) w
(Reword) w
(Reword) Cc Cc
to commit Cc Cc
进行提交 Magit manual can be found here: https://magit.vc/manual/magit.html (Search reword in the page) Magit手册可以在这里找到: https ://magit.vc/manual/magit.html(在页面中搜索reword)
cw (magit-commit-reword)
cw(magit-commit-reword)
Reword the last commit, ignoring staged changes.
重新命名最后一次提交,忽略分阶段更改。 With a prefix argument keep the committer date, otherwise change it.
使用前缀参数保留提交者日期,否则更改它。 The option magit-commit-reword-override-date can be used to inverse the meaning of the prefix argument.
选项magit-commit-reword-override-date可用于反转前缀参数的含义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.