How to use git merge --squash?

后端 未结 13 1603
夕颜
夕颜 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/
    git merge --squash origin/feature/
    

    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).

提交回复
热议问题