Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I undo "Resolve" in TortoiseGit?

I have merged two branches in a local Git repository, with a bunch of conflicts. Thinking that "Resolve" in the TortoiseGit context menu would take me to a conflict resolution GUI, I clicked it - just to realize I just marked all conflicts as resolved without doing anything about them. Thus I have a bunch of unmarked files with:

master<<<<<<<<<
some change
=======
some other change
>>>>>>>>>>branch

constructs in them, and Git doesn't know they're still a problem.

How do I undo this marking of conflicts as resolved, i.e., mark them as conflicts again?

like image 530
Tomas Aschan Avatar asked Aug 11 '11 10:08

Tomas Aschan


People also ask

How do I revert in tortoise git?

If you want to undo all changes you made in a file since your last commit you need to select the file, right click to pop up the context menu and then select the command TortoiseGit → Revert A dialog will pop up showing you the files that you've changed and can revert.

What does Tortoise Git resolve do?

It uses "git add" to mark file status as resolved to allow you to commit your changes and it removes the filename.

What is pull in TortoiseGit?

Fetch just downloads the objects and refs from a remote repository and normally updates the remote tracking branches. Pull, however, will not only download the changes, but also merges them - it is the combination of fetch and merge (cf. the section called “Merging”).


1 Answers

I don't use tortoise git, but you should be able to just hard reset back to before the merge and re-merge. Since you didn't do anything with the conflicts, the re-merge will give you the same output.

I just tested this.

  1. With your feature branch checked out, right click on the log on the commit right before your merge commit(on the feature branch).

  2. Click on "Reset feature_branch to here". In the subsequent window select hard.

  3. Your merge is now undone, merge it back in and it should give you the same conflict markers, but you will need to resolve them.

like image 70
Andy Avatar answered Oct 21 '22 07:10

Andy