Applying the changes from branch b to a, without merging or adding commits

前端 未结 5 838
逝去的感伤
逝去的感伤 2020-12-22 18:37

My scenario is that I have one branch in which I\'ve made big improvements to the build process (branch A) and in another I\'m working on a unrelated feature (branch B). So

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-22 19:26

    I just had to do something similar and was able to fix it by adding --squash to the merge command

    git merge --no-commit --squash branchA
    git reset HEAD # to unstage the changes
    

提交回复
热议问题