How do I check git log for a “fast-forward” merge?

后端 未结 3 1612
南笙
南笙 2021-02-14 13:53

In the following example, is there a way to know a merge happened? Looking at git log, I can\'t tell I merged.

# setup example directory
$ mkdir test
$ cd test
         


        
3条回答
  •  时光说笑
    2021-02-14 14:21

    You can use git merge-base:

    git merge-base master topic
    

    It will show the cccc64de3947828f487a8ce3c3e72b0f68dc88c3 ( 2) commit

    Or you can use:

    git show $(git merge-base master topic)
    

提交回复
热议问题