Git - How to selectively apply changes from one branch to another?

前端 未结 1 1096
逝去的感伤
逝去的感伤 2021-02-07 17:05

Is it possible to selectively apply changes from one branch to another with Git?

More specifically, I use a public dev branch for GitHub and a private

1条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 17:42

    I don't think there is a way to pick parts of a commit from the same file. I would say you need to simply re-factor your code to move such parts in different files.

    BTW, if you want to take some files from a commit, you can use cherry-pick with a combination of other commands as explained here.

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