gpt4 book ai didi

git - 在 GitHub 中编辑 git commit 消息

转载 作者:IT王子 更新时间:2023-10-29 01:18:37 26 4
gpt4 key购买 nike

有没有办法在提交后在线编辑 GitHub.com 中的提交消息?

从命令行,一个人可以做到

git commit --amend -m "New commit message"

another question 中的正确建议.

尝试 git pull 然后 git push 成功了(同时没有任何其他提交干扰)。

但是可以通过 GitHub 网站完成吗?

最佳答案

GitHub 的说明:

  1. 在命令行上,导航到包含您要修改的提交的存储库。
  2. 键入 git commit --amend 并按 Enter。
  3. 在您的文本编辑器中,编辑提交消息并保存提交。
  4. 使用 git push --force origin example-branch 命令强制推送旧提交。

来源:https://help.github.com/articles/changing-a-commit-message/

关于git - 在 GitHub 中编辑 git commit 消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10728420/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com