How to cherry-pick from a remote branch?

后端 未结 10 584
长发绾君心
长发绾君心 2020-12-07 11:17

I\'m having trouble performing a cherry-pick. On my local machine, I\'m currently on my \"master\" branch. I want to cherry-pick in a commit from another branch, named \"zeb

10条回答
  •  被撕碎了的回忆
    2020-12-07 11:55

    If you have fetched, yet this still happens, the following might be a reason.

    It can happen that the commit you are trying to pick, is no longer belonging to any branch. This may happen when you rebase.

    In such case, at the remote repo:

    1. git checkout xxxxx
    2. git checkout -b temp-branch

    Then in your repo, fetch again. The new branch will be fetched, including that commit.

提交回复
热议问题