Can anyone explain what git cherry-pick does?

前端 未结 3 1885
误落风尘
误落风尘 2021-01-13 10:01

As my concern here is, I have old commit in my another local branch [contains abc.cpp, def.cpp].

Now after few months I want use those changes, but in my current bra

3条回答
  •  滥情空心
    2021-01-13 10:33

    Yes, that's what it does. cherry-pick is applying a commit (or a range of them) as a patch to your branch (well, almost as a patch).

    You might have conflicts (like when you merge branches) since independent modifications have happened on your branches.

提交回复
热议问题