原因是local的branch上没有那个SHA1.

那个SHA1是另一个branch上,需要更新local branch.


方法1:

repo sync 本地branch,这样本地的是latest


以下来自于

http://stackoverflow.com/questions/13788945/how-to-cherry-pick-from-a-remote-branch

方法2:

- git checkout branch-a
- git pull origin branch-a
- git checkout branch-b
- git pull origin branch-b
- git cherry-pick <hash>

(branch-a 另一个branch.  branch-b本地)

方法3:

# fetch just the one remote
git fetch <remote>
# or fetch from all remotes git fetch --all
# make sure you're back on the branch you want to cherry-pick to
git cherry-pick xyz


git用法参考

http://www.open-open.com/lib/view/open1328069889514.html




Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐