How to use git merge --squash?

后端 未结 13 1428
夕颜
夕颜 2020-11-22 05:41

I have a remote Git server, here is the scenario which I want to perform:

  • For each bug/feature I create a different Git branch

  • I keep on com

相关标签:
13条回答
  • 2020-11-22 06:25

    For Git

    Create a new feature

    via Terminal/Shell:

    git checkout origin/feature/<featurename>
    git merge --squash origin/feature/<featurename>
    

    This doesnt commit it, allows you to review it first.

    Then commit, and finish feature from this new branch, and delete/ignore the old one (the one you did dev on).

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