-
Notifications
You must be signed in to change notification settings - Fork 63.1k
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
The section Comparing across forks only mentions the OWNER:BRANCH
pattern to specify a compare
branch in a three-dot comparison, but recently GitHub started using a new OWNER:REPO:BRANCH
pattern.
To compare branches on different repositories, preface the branch names with user names. For example, by specifying
octocat:main
forbase
andocto-org:main
forcompare
, you can compare themain
branch of the repositories respectively owned byoctocat
andocto-org
.Here's an example of a comparison between two repositories.
The new pattern can be found in the URL of "Open pull request" pages. Such pages can be opened by visiting https://github.com/OWNER/REPO/pull/new/BRANCH
or by clicking the "Open pull request" button in the page of a branch ahead of upstream default branch.
For example,
- https://github.com/muzimuzhi/docs/pull/new/gh34381-update-basehead-form jumps to https://github.com/github/docs/compare/main...muzimuzhi:docs:gh34381-update-basehead-form?expand=1 which consists of
muzimuzhi:docs:gh34381-update-basehead-form
pattern. - Clicking the "Open Pull Request" button opens the same URL https://github.com/github/docs/compare/main...muzimuzhi:docs:gh34381-update-basehead-form?expand=1.
Additional information
The old form OWNER:BRANCH
still works, though I don't know which one is preferable by the GitHub.
For example, https://github.com/github/docs/compare/main...muzimuzhi:gh34381-update-basehead-form?expand=1 still works.