2017-04-24 106 views
2

文件我推我有叉回购和拉:GIT:不流露出来的仓库

git pull origin master 

我添加一些文件,并做了一些改变,我想我的变化推到我的叉:

git add -A 
git commit -m "some changes" 
git push 

但我得到这个错误:

fatal: The current branch master has no upstream branch. 
To push the current branch and set the remote as upstream, use 

    git push --set-upstream origin master 

我试图原点设置:

git push origin master 

但我得到这个错误:

error: src refspec develop does not match any. 
error: failed to push some refs to 'https://github.com/meme/forkRepo.git' 

我固定的:

git的结帐主

,最后我做了一个推:

git push 
Everything up-to-date 

但我去GitHub,并检查我的叉子回购在浏览器中,但我添加的文件和文件更改不会显示。你们中的任何人都知道我的更改在哪里?我仍然可以在计算机上看到这些文件和更改。

我真的很感谢你的帮助

+0

你'push'并没有真正推动什么。你确定你在推动它之前进行了修改吗? 'src refspec dev不匹配任何'意味着你试图推送一个本地尚不存在的分支。看起来你在'dev'上,没有做任何事情并试图推动。 –

回答

1

问题是当前分支在上游不存在某种原因。请注意错误消息中告诉你使用什么,但是你错过了--set-upstream标志。

But I got this error:

fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use

git push --set-upstream origin master I tried to set the origin: 

git push origin master

不要

git push --set-upstream origin master