While working on a branch that I've opened a pull request on, I would like to see the exact same diff that GitHub displays on the commandline. What is the particular git diff command that replicates the list of changes GitHub displays for a pull request?
Make a new PR If you don't want to bother GitHub support or they are too slow for you or are unwilling, you can do the following: recreate your fork. recreate your branch from the pull request by doing git fetch <your configured remote for upstream> refs/pull/<your PR number>/head:<your branchname>
You can run the git diff HEAD command to compare the both staged and unstaged changes with your last commit. You can also run the git diff <branch_name1> <branch_name2> command to compare the changes from the first branch with changes from the second branch. Order does matter when you're comparing branches.
The closest thing is to diff with the common ancestor between your feature-branch and your base-branch.
Something like:
git diff `git merge-base feature-branch base-branch`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With