git cherry-pick or merge specific directory from another branch

后端 未结 5 1237
無奈伤痛
無奈伤痛 2020-12-31 01:00

I\'ve seen different posts on StackOverflow that explain cherry picking a bit, but the comments in their code aren\'t very specific as to what\'s a branch and what\'s a dire

5条回答
  •  轮回少年
    2020-12-31 01:17

    You can use git checkout -- .
    I'd do this: git checkout dev -- tools/my-tool

    Explanation: this tells git to replace/copy files from the branch dev and the path tools/my-tool to your current branch.

提交回复
热议问题