Development · Jan 2, 2022 · 1 min read
Mimic GitHub PR Diff Locally
Shawn Azdam · Software Engineer
What?!
The goal is to mimic the GitHub pull requests' file diff in your local repository:

How?
$ git diff <FIRTS_BRANCH_COMMIT_SHA> <LAST_BRANCH_COMMIT_SHA> --stat
To get a cleaner summary, pipe it to the tail command:
$ git diff <FIRTS_BRANCH_COMMIT_SHA> <LAST_BRANCH_COMMIT_SHA> --stat | tail -1
and you will get:
