I'm trying to view the difference between two revisions of the same commit in git. A diff of the diffs, basically. From what I've read so far, this is known as the "interdiff". I've read several tutorials on how to create interdiffs of git patches, but I haven't been able to get these methods to work in my particular case.
So here's the setup. I have two diverging branches, each with slightly different commits:
* 29e734f - (origin/feature_branch, new_commits) New commit 3 (69 minutes ago) <Ajedi32>
* b22ebea - New commit 2 (89 minutes ago) <Ajedi32>
* 09d42c2 - New commit 1 (2 hours ago) <Ajedi32>
| * 467e08f - (old_commits) Old commit 3 (4 weeks ago) <Ajedi32>
| * f2bf1cb - Old commit 2 (4 weeks ago) <Ajedi32>
| * 34a2187 - Old commit 1 (4 weeks ago) <Ajedi32>
|/
* 1b05a4a - (origin/base, base) Base commit (5 weeks ago) <Ajedi32>
In this example, I want to find the interdiff between "Old commit 3" and "New commit 3". I've tried creating a patch file from these two commits and running them through the interdiff
utility, but all I got was this:
1 out of 2 hunks FAILED -- saving rejects to file /tmp/interdiff-1.Kgwx8u.rej
interdiff: Error applying patch1 to reconstructed file
I'm not really sure what that means, so I'm kind of stuck now. Where do I go from here?
Note: I'm am not looking for git diff old_commits new_commits
here. I don't want the revisions to commits 1 and 2 included in the output.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…