# How to Merge Branch to Main Github

> To merge a branch to main in GitHub, navigate to the repository, click compare and pull request, select the base and compare branches, create the pull request, check the changes, and finally merge and confirm the pull request to integrate development progress.

Canonical: https://livedemo.ai/tutorials/how-to-merge-branch-to-main-github/
Apps: GitHub
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a49b1ab56e05a00ff49dc/preview?step=1

## Steps

1. Navigate to the repository where the branches are located.
2. Click on the 'Compare & pull request' button.
3. Click the branch dropdowns to change the base and compare branches.
4. To merge branches, select 'Main' as the base branch.
5. Select the 'compare' branch that you want to compare from.
6. Click 'Create pull request'.
7. Check the changes being merged to ensure everything looks correct.
8. Click 'Create pull request'.
9. Once approved, click 'Merge pull request'.
10. Confirm by clicking 'Confirm merge'.
11. By following these steps, merging branches helps integrate changes and maintain an updated main branch with the latest development progress.
