简体   繁体   English

Magit - 重命名最后一次提交

[英]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: 脚步:

  1. Press c (Commit) at commit. 在提交时按c (提交)。 (I usually move cursor to the first line after typing magit-status command) (我通常在输入magit-status命令后将光标移动到第一行)
  2. Press w (Reword) w (Reword)
  3. Rename 改名
  4. Press Cc Cc to commit Cc Cc进行提交
  5. Done 完成

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM