gpt4 book ai didi

git - 使用 TortoiseGit 撤消 git 提交

转载 作者:太空狗 更新时间:2023-10-29 12:58:11 24 4
gpt4 key购买 nike

我在 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/

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