git merge 并收到此错误“不指向提交”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11868796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git merge and got this error "does not point to a commit"
提问by leezhm
I forked a repo from github.com, and also had set the upstream remote. Below is my repo
我从 github.com 分叉了一个 repo,并且还设置了上游远程。下面是我的回购
[ Leezhm LIZHM ~/Developments/OF_GIT ] git remote -v
origin [email protected]:leezhm/openFrameworks.git (fetch)
origin [email protected]:leezhm/openFrameworks.git (push)
upstream https://github.com/openframeworks/openFrameworks.git (fetch)
upstream https://github.com/openframeworks/openFrameworks.git (push)
when I used this command
当我使用这个命令时
git fetch upstream develop
git merge upstream/mac8
It always got the following error
它总是出现以下错误
fatal: 'upstream/mac8' does not point to a commit
采纳答案by mgarciaisaia
You are just fetching upstream/develop
, while you want to fetch origin
to have origin/mac8
available.
你只是获取upstream/develop
,而要取origin
到具有origin/mac8
可用。
回答by Guru
git fetch
git checkout "new brach"
git pull "new branch"
git merge "new branch"
git fetch
git checkout “新
分支”
git pull “新分支” git 合并 “新分支”
This is worked for me
这对我有用
回答by Flyakite
There is probably no corresponding branch in origin/xxx
.
中可能没有相应的分支origin/xxx
。