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

后端 未结 3 1613
南笙
南笙 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:30

    If you would like to try a case where you have a real merge, you could run the following commands after git checkout master:

    touch c
    git add c
    git commit -m "3"
    git merge topic
    

    That is, you add a commit to the master branch. Then the graph of commits is no longer a linear sequence, and data has to be merged from multiple branches.

提交回复
热议问题