I was trying to compare changes I made to a forked repo.
To make this real, here is the example:
- I forked https://github.com/springframeworkguru/sfg-di as https://github.com/steranka/udemy-sfg-di.
- I got a local copy of the (forked) repo
git clone git@github.com:steranka/udemy-sfg-di.git
- I changed to the branch I wanted to work on
git checkout property-source
. - Made changes and committed the changes (to my local repo).
- Push my changes to my fork so the changes can be compared to the original repo.
git push
Now I want to compare my changes to the equivalent branch on the original repo.
The origin and upstream are set to:
origin: git@github.com:steranka/udemy-sfg-di.git
upstream: git@github.com:springframeworkguru/sfg-di.git
Searching for solution
My searches indicated that there was not a built in way to do this using the git CLI, nor the github website.
What I did find was:
https://stackoverflow.com/a/66613981/3281336. Basically do the compares via local repo.
How to compare a local Git branch with its remote branch - How to compare local vs remote branch. Later, I learned this is basically what a forked repo is... Just another remote.
General info about forks (from GitHub.com) https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests - The GitHub.com docs indicate that this is doable if you create a pull request. This is not what I want to do.
My question
How do you do this? I ran across gh-cli which might do it.
Can this be done via the github.com web interface? If so, how?