Reputation: 3423
Using git bisect I found the culprit commit - it is a merge commit (I'm on the master branch)
I'm trying to isolate the buggy code but the merge included some commits from the merged branch and I don't know how can I view the full changes between the merge commit and the commit before it (the previous working commit in the master)
Is there a way to do so in GIT?
Upvotes: 0
Views: 64
Reputation: 34722
git diff
displays differences between commits. The variation you want is probably this:
git diff [--options] <commit> <commit> [--] [<path>…]
This is to view the changes between two arbitrary <commit>.
So for your case, use sha1 of the merge commit for the other, and sha1 of the commit that you want to compare it to as the other.
git diff <sha1 of the commit to compare to> <sha1 of merge commit>
You could also use ^
operator to compare to parents of the merge commit. sha1^
would be the first parent and sha1^2
would be the second, as explained here.
Upvotes: 1