Can I use the github /compare
to display the difference between two different source files in HEAD?
Here is how I do it on the command line with git d
On my DevOps team, it is very common to need to create new infrastructure resources (via Infrastructure As Code) which closely resembles existing infrastructure but with just a few changes. When a GitHub "Pull Request is received, the code reviewer is shown thousands of lines of code to Review and Approve. Even if they knew which small portion of the code should be changed, they should feel comfortable assuming "all that other green/new code must have be copied correctly from the correct spot.
I KNOW HOW TO DO THIS VIA THE CLI! But, because we have a workflow that centers around GitHub Enterprise (and private repos) my team doesn't use the CLI for this or much of anything.
Since GitHub only accepts points in history for comparisons and not paths I have to get clever.
Assuming FileA is the original and FileB is the modified file at a new path
See: https://github.com/org_name/repo_name/compare/diff-TICKET-1234..TICKET-1234