Using TortoiseGit’s Visual Conflict Resolver for Safer Interactive Rebases
Learn how to enable TortoiseGit’s internal merge tool, run an interactive rebase, and resolve conflicts with a side‑by‑side visual editor to keep your feature branch history clean and error‑free.
30 Aug 2025, 18:37 UTC

The problem: manual conflict resolution during rebases
When you rebase a feature branch onto an updated main branch, Git reapplies each commit one by one. If the same lines have changed in both branches, Git stops and marks a conflict. Resolving those conflicts by hand in a text editor is error‑prone; you might accidentally keep the wrong lines, lose a change, or introduce whitespace issues, especially when the rebase involves many commits.
Why TortoiseGit’s visual conflict resolver helps
TortoiseGit ships with its own merge tool, TortoiseGitMerge, which can display the conflicting versions side‑by‑side. When an interactive rebase hits a conflict, TortoiseGit can launch this tool automatically, letting you see the incoming change (THEIRS), your current change (YOURS), the common base (BASE), and the result you are building (MERGE). You pick the lines you want, save, and close the window; the rebase then proceeds without you ever touching a raw conflict marker.
1. Enable TortoiseGit’s internal merge tool
Open the repository’s settings, verify that TortoiseGitMerge is selected as the merge and diff tool. This ensures the visual resolver is invoked instead of an external program.
- Right‑click the working copy folder →
TortoiseGit → Settings. - In the left pane choose
Diff Tool→Merge Tool. - Set both
Merge toolandDiff tooltoTortoiseGitMerge. - Click
OKto save.
No command line is required; the change takes effect immediately for any subsequent TortoiseGit operation.
2. Start an interactive rebase
With the tool enabled, you can begin an interactive rebase directly from the context menu.
- Right‑click the repository folder →
TortoiseGit → Rebase…. - In the
Rebasedialog, enter the upstream branch you want to rebase onto, for exampleorigin/main. - Check the box labelled
Rebase upstream onto current branch(or the equivalent option that makes the current branch the target). - Make sure
Interactive rebaseis selected. - Click
Startto begin.
If the rebase can fast‑forward without conflicts, TortoiseGit will finish silently. Otherwise it will pause at the first conflicting commit and launch the merge tool.
3. Resolve conflicts with the visual editor
When a conflict appears, TortoiseGitMerge opens a four‑pane view:
LEFT– the version from the upstream branch (THEIRS).RIGHT– the version from your current branch (YOURS).BASE– the common ancestor.MERGE– the pane where you build the resolved file.
Worked example: rebasing a feature branch named feature/login onto origin/main produces a conflict in src/App.java. In the merge tool you see that the upstream change added a new logging line, while your change renamed a variable. You can:
- Select the logging line from
LEFTand copy it intoMERGE. - Keep the variable rename from
RIGHT. - Edit any stray whitespace directly in
MERGE. - Press the
Savebutton (orCtrl+S) and close the window.
TortoiseGit then marks the conflict as resolved and moves to the next commit that needs attention, repeating the process until all conflicts are cleared.
4. Finish the rebase and verify the result
After the last conflict is resolved, the rebase dialog offers a Continue button.
- Click
Continueto let Git apply the remaining commits. - When the rebase ends, a summary window shows the outcome.
- Open
TortoiseGit → Show logto inspect the history. - Confirm that the commits from
feature/loginnow appear linearly on top oforigin/mainand thatsrc/App.javacontains the expected combined changes (logging line and variable rename).
If anything looks wrong, you can abort the rebase from the same dialog (Abort) and return to the pre‑rebase state.
Trade‑off and limitation
The visual conflict resolver is convenient, but it relies on TortoiseGitMerge being the active merge tool. If you have configured an external diff/merge program (e.g., Beyond Compare, Kaleidoscope), TortoiseGit will invoke that program instead and the side‑by‑side GUI described above will not appear. Additionally, the tool works best with text files; large binary files or submodule conflicts still require manual resolution outside the GUI. For very complex rebases that need options like --preserve-merges or custom edit‑todo steps, the command line remains more flexible.
Actionable closing
Try the workflow on a disposable test branch first:
- Create a test branch:
git checkout -b test-rebase origin/main. - Make a few commits, then run the interactive rebase steps above.
- Verify the log and file contents as described.
Once you’re comfortable, adopt the visual resolver for regular feature‑branch updates. Keep the command line handy for scenarios where you need fine‑grained control, but for most day‑to‑day rebases the TortoiseGitMerge interface reduces mistakes and speeds up the process.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.