[英]Undo git commit with TortoiseGit
I'm using TortoiseGit in Windows for my git projects. 我在Windows中使用TortoiseGit作为我的git项目。
I made a local commit on my project. 我在我的项目上做了一个本地提交。 And I want to undo it.
我想撤消它。
How to undo git commit with TortoiseGit? 如何用TortoiseGit撤消git commit? without discarding my changes
不丢弃我的更改
Reset
Reset
and 和
[NOTE] if you want to keep working tree changes, use Mixed
instead. [注意]如果要继续更改树,请使用“
Mixed
。
the result: 结果:
Rebase with Force
Rebase with Force
and 和
(You may hit the conflicts, but how to resolve the conflicts is another story. :P ) (你可能会遇到冲突,但如何解决冲突是另一回事。:P)
and 和
the result: 结果:
TortoiseGit -> Show Log -> Revert change by this commit
这将生成一个恢复提交的提交,因此您不会“丢失”您的更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.