I have two branches A, and B. (they're both remote branches too). Is there a way to do a diff of a single file between the two branches? It's located in the same place in both branches etc.
Asked
Active
Viewed 199 times
1
-
possible duplicate of [Unable to diff files in two separate branches in Git](http://stackoverflow.com/questions/916822/unable-to-diff-files-in-two-separate-branches-in-git) – Brian Roach Feb 17 '12 at 17:14
-
And [this is an answer](http://stackoverflow.com/a/916914/960558) – Lazy Badger Feb 17 '12 at 17:39
-
@LazyBadger: It may be an answer but it's not a *good* answer. There's no reason to specify the filename twice. – Cascabel Feb 17 '12 at 18:07
-
@Jefromi - in original question it's a must due to rename – Lazy Badger Feb 17 '12 at 18:21
-
Sure. That doesn't make it useful for this question, though. (And I'm sure there's a duplicate question here somewhere, but I do not think that one's a good candidate. That poster wants to use a difftool.) – Cascabel Feb 17 '12 at 18:34
2 Answers
-1
git diff A:File..B:File
Git Reference (abot git diff), Git Community Book, "git - compare branches" for details

Brian Webster
- 30,033
- 48
- 152
- 225

Lazy Badger
- 94,711
- 9
- 78
- 110