Sourcetree Interactive Rebase: Visual Commit Editing and Conflict Handling
Sourcetree's interactive rebase UI lets you reorder, squash, and edit commits with a live graph preview and built‑in three‑way merge tool, turning a tedious CLI task into a visual workflow.
02 Nov 2026, 13:30 UTC

The problem: tangled history
When a feature branch accumulates many small commits — fixes, typo corrections, experimental spikes — the history becomes noisy. Reviewers waste time reading dozens of "wip" messages, and bisecting a regression later is harder. The usual fix is an interactive rebase, but the command‑line workflow forces you to edit a text file, remember the action keywords, and resolve conflicts in a separate terminal.
Interactive rebase dialog
Sourcetree opens a dedicated dialog when you choose Repository → Interactive Rebase… (or press Ctrl+Shift+R on the current branch). The dialog lists each commit as a draggable row with an action dropdown: pick, squash, fixup, reword, edit, drop. Changing the action updates the commit graph preview in real time, so you can see the resulting topology before you confirm.
Live graph preview
The graph pane on the right side of the dialog reflects every drag‑and‑drop or action change instantly. Commits that will be squashed appear merged into a single node; dropped commits disappear. This visual feedback eliminates the trial‑and‑error cycle of editing the rebase‑todo file, saving time especially when you reorder more than a handful of commits.
Conflict resolution with three‑way merge tool
If the rebase pauses on a commit marked edit (or when a pick hits a conflict), Sourcetree launches its built‑in three‑way merge tool. The tool shows base, local (your branch), and remote (upstream) versions side by side with inline diff highlights. You resolve each hunk, stage the result, and click Continue. When all conflicts are cleared, the rebase auto‑continues without dropping back to the CLI.
Worked example: squashing a feature branch
- Open the repository in Sourcetree and check out the local branch
feature/login‑refactor. - Press Ctrl+Shift+R to start an interactive rebase on the last five commits.
- In the dialog, set the top commit to
pickand the next three tosquash. The graph preview collapses them into a single node. - Optionally change the commit message by selecting
rewordon the first commit; a small editor appears when you confirm. - Click Start Rebase. If a conflict appears, the three‑way merge tool opens; resolve, stage, and continue.
- When the rebase finishes, the history shows one clean commit. Push with Push → Force Push; Sourcetree displays a warning banner naming the remote and branch (e.g.,
origin/feature/login‑refactor) and a one‑click Push with force button.
Trade‑off: history rewrite and force‑push risk
Interactive rebase rewrites commit SHAs. Force‑pushing a shared branch can break collaborators’ repositories. Sourcetree warns you with a banner that lists the exact remote and branch, but it cannot override server‑side branch protection rules. If the branch is protected, the push will be rejected and you must coordinate with the team (e.g., open a pull request instead). Additionally, rebases with more than ~100 commits may cause UI lag on older machines because the graph preview renders incrementally.
Limitations to keep in mind
- Submodule commits appear as single rows; editing their internal history requires opening the submodule repository separately.
- Git‑flow finish actions default to
--no-ffmerges; changing this behavior means editing the Git‑flow configuration file outside Sourcetree. - LFS‑locked files show a lock icon, but conflict resolution during rebase does not auto‑acquire locks — you may need to run
git lfs lockmanually after the rebase completes.
Actionable closing
Try the workflow on a local branch that has at least three commits. Open the interactive rebase dialog, reorder or squash a couple of commits, and watch the graph preview update. Resolve any conflict that appears using the three‑way merge tool, then force‑push and verify the warning banner matches the expected remote. This hands‑on test confirms that the visual rebase UI behaves as described and lets you decide whether to adopt it for your team’s daily Git hygiene.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.