Here's the diff in question. It's a view of 2/3 commits for a Pull Request: https://github.com/codeapprove/meta/pull/15/files/5b7549cd97845c41019478f8f339a90c0256014f..7327dfcfb3a95b31f8bf4845556196abe33fefc8
GitHub shows the diff like this:
However if I do a naive git diff
at the command line I get something else:
git diff 5b7549cd97845c41019478f8f339a90c0256014f..7327dfcfb3a95b31f8bf4845556196abe33fefc8
diff --git a/index.js b/index.js
index 5f87902..1885a31 100644
--- a/index.js
+++ b/index.js
@@ -5,6 +5,10 @@ function main(args) {
console.info(args);
}
+function qooBoz() {
+ console.log("qooBoz");
+}
+
function fooBar(x, y) {
const z = x + y;
return z;
@@ -16,6 +20,7 @@ function barBaz(q, z) {
}
function bizBom(a, b) {
+ console.log("bizBom");
const c = a + b;
return c;
}
The difference is that GitHub seems to be "ignoring" the merge commit and just focusing on the changes made by the PR author. In most cases that's the relevant diff and what I'd ike to see.
How can I get that same diff at the command line, knowing only the two commit hashes 5b7549cd97845c41019478f8f339a90c0256014f
and 7327dfcfb3a95b31f8bf4845556196abe33fefc8
?
Edit 1
I think a clearer way to ask is: what is the difference between what GitHub is doing, in terms of git operations, at these two links: