Step 1: Check Merge Blockers
Start in the Commit Graph and select the branch or worktree you’re preparing to merge. GitLens shows HEAD, upstream, merge target, incoming work, and ahead/behind status together so you can quickly see where the branch stands. Use Compare from the Graph to inspect how the branch differs from its target and identify what needs attention before you start changing history or moving it toward merge.
- A branch or worktree is functionally complete and needs to be prepared for merge.
Step 2: Review The Changes
Before changing the branch history, switch the Commit Graph’s details panel into Review mode to validate what you’re about to land. Scope the review to the relevant working changes or commits and use AI Review to surface focus areas and severity-tagged findings tied to the code. Inspect anything that needs attention, refine the review with follow-up questions when needed, and address findings before the branch moves forward.
- The changes have been reviewed and known issues are addressed before integration.
Step 3: Shape Clean Commit History
Open Compose in the Commit Graph’s details panel to turn working changes into clean, logical commits before they land. Review the proposed draft commits, move files between them, reorder the sequence, edit or regenerate commit messages, and preview the resulting changes before writing them to history. If the branch already contains commits that need cleanup, use Recompose on the branch or a selected range of commits to restructure only the history that needs attention.
- The branch tells a clean, reviewable story before it is merged.
Step 4: Rebase Onto the Target Branch
When the target branch has moved ahead, start a rebase from the Commit Graph and choose Automatic Rebase to bring your branch up to date. GitLens uses AI to work through qualifying conflicts, stage the resolutions, and continue the rebase automatically instead of stopping at every conflicting commit. Follow progress in the Graph as the rebase runs, and GitLens pauses when a conflict needs your judgment rather than applying a low-confidence resolution automatically.
- The branch is current with its target and its commits are ready to integrate.
Step 5: Get the Branch Merge-Ready
If conflicts remain, open Resolve from the conflicted WIP state in the Commit Graph. GitLens shows the competing changes and can generate proposed resolutions with explanations and confidence indicators, using repository context when a conflict needs more information. Review the proposed result before applying it, or use manual actions when you want to make the call yourself. Once conflicts are cleared, return to Review for a final pass before opening or updating the pull request.
- • The working tree is clean and commits are organized.
- • The branch is synced and no merge conflicts remain.
- • The branch passes the readiness checks and is ready to move into a pull request.
Step 6: Get The Tools To Complete This Workflow
You’ve checked the branch for blockers, cleaned up the commit history, synced with upstream, resolved conflicts, and confirmed the branch is ready to move forward. GitLens keeps that preparation connected inside the Commit Graph so you can understand the branch, shape the history, rebase, resolve, and verify readiness without rebuilding context across separate tools. GitKraken Desktop can support visual conflict resolution, while Kepler helps carry agent-generated work toward the same merge-ready state. The goal is a branch that is clean, current, understood, and ready for the next step toward main.
- Download the GitKraken tool that fits where you work most: your agent workspace, repository, or IDE
- Create a free account and unlock every feature for 14 days
- Connect your repository and integrations, then put your first agent to work on a task or issue
Related Resources
Example Assets
Related Resources
Example Assets
Related Resources
Example Assets
Example Assets
Related Resources
Example Assets
Download the tools you need to keep your code flowing
One GitKraken Pro subscription gives you access to all of these tools for the cost of one single subscription.
Gitlens for IDEs
For devs who live in their IDE. Rich code context, history, and authorship right where you already work.
GitKraken
Desktop
For devs who work at a repo level & want a dedicated, visual command of their branches, commits, conflicts — all in one place.
Kepler
For devs scaling their use of AI agents. Orchestrate, observe, and stay in control of every agent in flight.
© 2026 Axosoft, LLC dba GitKraken. All rights reserved.
GitKraken MCP
GitKraken Insights