I'm using TortoiseGit in Windows for my git projects.
I made a local commit on my project. And I want to undo it.
How to undo git commit with TortoiseGit? without discarding my changes
If you have a commit that has been pushed into the remote branch, you need to revert it. Reverting means undoing the changes by creating a new commit. If you added a line, this revert commit will remove the line. If you removed a line, this revert commit will add the line back.
TortoiseGit is a Windows Shell Interface to Git and based on TortoiseSVN. It's open source and can fully be build with freely available software. Since it's not an integration for a specific IDE like Visual Studio, Eclipse or others, you can use it with whatever development tools you like, and with any type of file.
Reset
and
[NOTE] if you want to keep working tree changes, use Mixed
instead.
the result:
Rebase with Force
and
(You may hit the conflicts, but how to resolve the conflicts is another story. :P )
and
the result:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With