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

前端 未结 5 836
逝去的感伤
逝去的感伤 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'm not 100% sure I understood it clearly, but in my case I've just created diff patch between branches and then applied this path on B branch.

    Inside branch A:

     git diff branchA..branchB > patch.diff
     git apply patch.diff
    

提交回复
热议问题