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)
A branch is just a pointer to a specific commit. So you can't find out from what branch a certain commit came from.
When doing a fast-forward, the only thing that changes is that the commit a certain branch points to is switched, so no extra commit will be recorded. If you do want an extra commit to be recorded, use
git merge --no-ff.