Magit - 重命名最后一次提交
Magit - rename last commit
如何重命名 Magit 中的最后一次提交(即编辑提交消息)?
我可以在 magit-log-buffer-file
中看到它,但我不知道如何与之交互。
按c(提交),然后a(修改), 编辑消息,C-c C-c,收益!
在最新的Magit(Current version:v2.13.0)
中有一个名为magit-commit-reword
的命令
步骤:
- 在提交时按
c
(提交)。 (我通常在输入 magit-status
命令后将光标移动到第一行)
- 按
w
(改写)
- 重命名
- 按
C-c C-c
提交
- 完成
Magit 手册可以在这里找到:https://magit.vc/manual/magit.html(在页面中搜索改写)
c w (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 中的最后一次提交(即编辑提交消息)?
我可以在 magit-log-buffer-file
中看到它,但我不知道如何与之交互。
按c(提交),然后a(修改), 编辑消息,C-c C-c,收益!
在最新的Magit(Current version:v2.13.0)
中有一个名为magit-commit-reword
的命令
步骤:
- 在提交时按
c
(提交)。 (我通常在输入magit-status
命令后将光标移动到第一行) - 按
w
(改写) - 重命名
- 按
C-c C-c
提交 - 完成
Magit 手册可以在这里找到:https://magit.vc/manual/magit.html(在页面中搜索改写)
c w (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.