Git 提交日志是分支本地的,因此在此处发生合并之前 - 您不会在可视日志中看到该提交,除非您已签出该分支。
spiders-iMac:git-practice david$ git checkout master
spiders-iMac:git-practice david$ git log --oneline
f1aa76b Contents added to FileA
3c5a4fc Initial commit on master
spiders-iMac:git-practice david$ git checkout somethingnew
Switched to branch 'somethingnew'
spiders-iMac:git-practice david$ git log --oneline
187cd79 Merge branch 'master' into somethingnew
f1aa76b Contents added to FileA
a8fe187 Added FileB on branch somethingnew
3c5a4fc Initial commit on master
spiders-iMac:git-practice david$ git reflog
187cd79 HEAD@{0}: checkout: moving from master to somethingnew
f1aa76b HEAD@{1}: checkout: moving from somethingnew to master
187cd79 HEAD@{2}: checkout: moving from master to somethingnew
f1aa76b HEAD@{3}: checkout: moving from somethingnew to master
187cd79 HEAD@{4}: merge master: Merge made by the 'recursive' strategy.
a8fe187 HEAD@{5}: checkout: moving from master to somethingnew
f1aa76b HEAD@{6}: commit: Contents added to FileA
3c5a4fc HEAD@{7}: checkout: moving from somethingnew to master
a8fe187 HEAD@{8}: commit: Added FileB on branch somethingnew
3c5a4fc HEAD@{9}: checkout: moving from master to somethingnew
3c5a4fc HEAD@{10}: commit (initial): Initial commit on master
spiders-iMac:git-practice david$