3

Yes I am aware of this one Git Merge --no-ff makes copy of commits

I have 3 commits off branch feature_a. Then I go back to develop branch, and do a

git merge --no-ff feature_a

When I do a

git log --oneline

I get 4 new commits in my listing (3 from before plus 1 "merge commit"). However, in GitHub Desktop, I only see one, i.e. the new "merge commit". Does GitHub Desktop allow me to see the individual commits? I've also deleted the feature branch, and that doesn't change anything. How is GitHub Desktop hiding my 3 commits?

I realize it has two parents, but I'm not sure how GitHub Desktop is choosing which parent/chain to display. Perhaps this is just a limitation of the tool.

I've also checked SourceTree and it shows all the commits fine, and somehow it knows how to colour the branching correctly so the 3 commits are different.

Edit: Actually the question can be asked from the command line perspective.. Why does the git log command show one path of the merge (with each feature commit) and can it be changed to show the other path?

Community
  • 1
  • 1
ergonaut
  • 6,929
  • 1
  • 17
  • 47

1 Answers1

0

Github Desktop doesn't provide a way to see the individual commits from a merge.

If you want to get a similar output from the command line you can try git log --first-parent.

You can get more details in that answer

Community
  • 1
  • 1
filhit
  • 2,084
  • 1
  • 21
  • 34