原因是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