git - 使用 TortoiseGit 撤消 git 提交

标签 git commit tortoisegit

我在 Windows 中为我的 git 项目使用 TortoiseGit。

我对我的项目进行了本地提交。我想撤消它。

如何使用 TortoiseGit 撤消 git 提交?不放弃我的更改

最佳答案

撤消上次提交:Reset

enter image description here

enter image description here

[注意]如果您想保持工作树的变化,请改用Mixed

结果:

enter image description here


撤消/删除不是最后一个的提交:Rebase with Force

enter image description here

enter image description here

(你可能会遇到冲突,但如何解决冲突是另一回事。:P)

enter image description here

结果:

enter image description here

关于git - 使用 TortoiseGit 撤消 git 提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23289965/

相关文章:

commit - Gitlab 没有关闭我通过提交引用的问题

Git:Stage into Commit,什么是正确的工作流程?

git - 使用 TortoiseGit cherry-pick

git - Rsyncing git repo 是否足够好备份解决方案?

git - git 中的远程和集中存储库是一回事吗?

git - 什么 git 函数允许我批准/拒绝提交将进行的每个更改?

GIT 菜单不可见

git - 用 git 计算行变化?

git - 取消忽略特定的 bin 目录

git - 回滚到上次 git 提交