Git branches & commits history after merge

后端 未结 2 1151
半阙折子戏
半阙折子戏 2021-01-31 19:04

I\'m working on a project (alone) and for every feature I develop I create a new branch, work on this feature, then merge it to master. So normally I never work on two different

相关标签:
2条回答
  • 2021-01-31 19:39

    You can found addition criticism to the -no-ff option in "Understanding the Git Workflow", mainly because it would break git blame.
    More at "fast forward when using pull and no-ff when pull".

    As explained in "Why does git use fast-forward merging by default?", unless you are talking about a really long-lived branch, a fast-forward merge is preferable.

    0 讨论(0)
  • 2021-01-31 19:47

    That is normal Git behaviour. You are doing what is called a "fast-forward" merge, because your branch is strictly ahead of the master branch.

    If you really want to preserve branch history (although I'd recommend you don't bother) then you can use git merge --no-ff to force it to create a merge commit even when it can do a fast-forward update.

    0 讨论(0)
提交回复
热议问题