This might be a repeated question but i didn't find exact answers.
Lets say i have 2 branches br1 and br2 with 3 commits each.
br1
- commit a
- commit b
- commit c
br2
- commit d
- commit e
- commit f
When i merge from br2 to br1, git log on br1 show commits a,b,c,d,e,f.
Lets say i have 2 branches br1 and br2 with 3 commits each.
br1 after merge with br2
- commit a
- commit b
- commit c
- commit d
- commit e
- commit f
Is there a way to filter commits that were created on br1 alone? (I have tried git log br1..br2 but is there any other method?)
If the merge was Fast-forward or Automerge, will GIT record any commit for the merge? (i see commit when there is a conflict but not in an automerge)
The problem with
git log br1..br2
is that it will try to suppress the commits the commits that are part of br1, but all the commits are part of br1 now, so nothing will show.What you can do is find the commit right before the merge of br2;
git log br1^..br2
, but that would only work only if br1 has not moved forward.In general the best way is to find out the relevant merge, and show the commits that were merged: