Skip to main content
Collaborate at HartSign in

← Back to Help Center

Comparing branches and merging

Review diffs between branches and merge changes on the Branches page.

  1. 1. Compare two refs

    Open /{owner}/{repo}/compare/{base}...{head} (for example main...feature/login) to see Compare changes with files changed and ahead/behind counts.

  2. 2. Open Branches

    Go to the Branches tab to create branches, preview merges, and delete branches you manage.

  3. 3. Configure a merge

    In the merge section, pick a target branch (usually the default) and a source branch to merge in. Adjust the merge message if needed.

  4. 4. Preview and merge

    Run merge preview. If there are no conflicts, the merge completes automatically. Otherwise resolve conflict markers in the form and submit the merge.

  5. 5. Protected branches

    If the default branch is protected, direct pushes and some edits are blocked — merge through a branch workflow instead. See Protected branches.