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?
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? "
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.