Quick summary
Comparing branches in GitHub lets developers review commits and file differences between any two branches before merging. Using the Compare & pull request workflow, you can select a base branch and a compare branch to instantly see all code changes side by side.
Steps
- Navigate to the repository where the branches are located.
- Click the Compare & pull request button.
- Click the branch dropdowns to change the base and compare branches.
- Set the base branch — this is the branch you want to compare to.
- Set the compare branch — this is the branch you want to compare from.
- Review the comparison of commits and file differences between the two branches that GitHub displays.
.gif)



