Skip to content
Discussion options

You must be logged in to vote
Admin verified this answer by Harshul1484 Jan 14, 2026

Use GitHub’s Compare URL directly
You can manually construct the comparison URL:
https://github.com///compare/...

Replace:
with the GitHub username or org (e.g., octocat)
with the repository name (e.g., Spoon-Knife)

with the branch you want to compare to (often main) with the branch you want to compare from

[Edited by @queenofcorgis to add the below]

We have a good example here in the docs for comparing branches and commits as well:

For more information, read Comparing branches in the GitHub Docs.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@davaya
Comment options

@Harshul1484
Comment options

Answer verified by Admin Jan 14, 2026
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repositories The core of version-controlled code storage Question Ask and answer questions about GitHub features and usage
3 participants