您的位置:首页 > 移动开发 > Objective-C

git cherry-check error "fatal: bad object"

2015-09-06 22:26 561 查看
原因是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


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: