I'm convinced I've written a method in a different branch, but not the current one. Is there any way to view all changes to a file in different branches, ideally one that ignores branches merged into the current branch?
Asked
Active
Viewed 68 times
0
-
This sounds a lot like `git diff`... Is there a reason that is insufficient? What have you (or not) tried? – twalberg Feb 25 '13 at 17:06
1 Answers
2
To see all changes to files between two branches do the following:
git diff --stat <branch1> <branch2>
Then if you see the file that has changed between those two branches do:
git diff <branch1> <branch2> -- /path/to/file
If that's not enough, let me know.
Update: It appears this may be a duplicate of "How can I search Git branches for a file or directory?"

Community
- 1
- 1

Trevor Norris
- 20,499
- 4
- 26
- 28
-
The trouble is not knowing which branch the file is in, and there are a fair few at the moment, so I'd like a way to look at all branches at the same time (local is probably enough, not remote). – Dean Barnes Feb 26 '13 at 10:14