Git fast forward VS no fast forward merge

后端 未结 4 744
梦毁少年i
梦毁少年i 2020-11-29 15:18

Git merge allow us to perform fast forward and no fast fast forward branch merging. Any ideas when to use fast forward merge and when to use no fast forward merge?

4条回答
  •  無奈伤痛
    2020-11-29 16:14

    When we work on development environment and merge our code to staging/production branch then Git no fast forward can be a better option. Usually when we work in development branch for a single feature we tend to have multiple commits. Tracking changes with multiple commits can be inconvenient later on. If we merge with staging/production branch using Git no fast forward then it will have only 1 commit. Now anytime we want to revert the feature, just revert that commit. Life is easy.

提交回复
热议问题