Git错误:'上游'似乎不是一个混帐存储库 [英] Git Error : 'upstream' does not appear to be a git repository
问题描述
我对Git非常陌生,所以在正确使用时遇到一些问题。
这是我的场景。
我有一个主存储库的分支,并将其克隆到我的本地。
在那里,我有2个分支用于不同的修复。
当我提交时,我在git中看到一个声明 - 我们说我是3次提交提前和大约20提交落后。
我明白我的分叉不与主同步。我还需要合并两个分支(或者我应该这样做吗?)
我使用Windows客户端进行同步。但似乎我没有遵循Git的方式。因此,我尝试按照
我的git客户端说本地回购是最新。
但在线git表示,我们提前42次提交并提交了7次提交。 解决方案
(尽管它可能已经改变,因为你问)开始引用 https://help.github.com/articles/configuring-a-remote-for-a-fork/ 。如果你完成了这个任务,你将有一个名为upstream的新远程仓库指向你分叉的原始仓库,并且 git fetch upstream
将可以工作。
I'm very new to Git, so facing some issues with it correct usage. Here is my scenario.
I have a fork of my master repository and cloned it into my local. In that, I have 2 branches for different fixes.
When I commit, I saw a statement in the git-we saying that I'm 3 commits ahead and around 20 commits behind.
I understand that my fork is not in sync with master. Also I need to merge the two branches too (or should i do it?)
I used the windows client to syncing. But seems I'm not following the Git way. So, I tried to follow the steps described in https://help.github.com/articles/syncing-a-fork/ which is giving me an error as follows (I'm using windows).
$>git fetch upstream
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I'm a bit confused. Please help me with steps I should follow in this scenario.
@HuStmpHrrr
Sorry for adding the details in comments I'll modify the question for readability
By executing the command:
$>git remote returning two values
acme-development (which the name of my actual/main repository, from where I forked) and
origin
Adding some more info.
After making a fetch, I tried a origin/master merge on to my master Please see the screenshot
But, if I login to my Github online account, it is saying a different story.
My git client says that the local repo is up to date. But the online git says that we are 42 commits behind and 7 commits ahead.
The article you link to (though it may have changed since you asked) starts with a reference to https://help.github.com/articles/configuring-a-remote-for-a-fork/. If you complete this you will have a new remote repository named upstream pointing to the original repository which you forked, and git fetch upstream
will work.
这篇关于Git错误:'上游'似乎不是一个混帐存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!