Undo git commit with TortoiseGit

I am using TortoiseGit on Windows for git projects.

I made a local commit in my project. And I want to cancel it.

How to undo git commit with TortoiseGit? without discarding my changes

+4
source share
2 answers
TortoiseGit -> Show Log -> Revert change by this commit

This will result in a commit, which will return a commit, so you won’t lose your changes.

+5
source

Undo the last commit: Reset

enter image description here

and

enter image description here

[NOTE] if you want to save working tree changes, use Mixedinstead.

result:

enter image description here


Cancel / delete commit that is not last: Rebase with Force

enter image description here

and

enter image description here

( , - .: P)

enter image description here

:

enter image description here

+3

Source: https://habr.com/ru/post/1538037/


All Articles