git - 如何在 git 中重新提交

标签 git

我已经对 git 进行了一些更改。现在我想更改提交文本。有没有可能做到这一点?我正在使用 eclipse git 和 git 乌龟

最佳答案

您可以使用 git commit --amend -m "message"或者可以这样做,这是相当等效的:

$ git reset --soft HEAD
$ ... do something else to come up with the right tree ...
$ git commit -c ORIG_HEAD

关于git - 如何在 git 中重新提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35173077/

相关文章:

用于维护不同版本的 Git 分支模型

macos - 无法切换分支 : untracked working tree file because of case-insensitivity?

python - 与 python 2.7/flask/mongoDB/git 的持续集成

git - 为 GitHub pull 请求更改 "base repo"

git - 如何将使用 PuTTYgen (Windows) 生成的 SSH key 对转换为 ssh-agent 和 Keychain (Linux) 使用的 key 对

git - 使用 Git 恢复子模块

git - 当我的分支领先 master 5 个提交时,如何在提交中删除太大的文件

windows - 为什么 'git log' 在 Windows 7 64 上这么慢?

git - Visual Studio 团队资源管理器 - 查看 Git 命令

git - BUG : unpack-trees. c:699: pos 必须指向这个目录的第一个条目