Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Error : 'upstream' does not appear to be a git repository

Tags:

git

github

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 enter image description here

But, if I login to my Github online account, it is saying a different story.

enter image description here

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.

like image 911
kallada Avatar asked Oct 02 '15 17:10

kallada


People also ask

How do you fix does not appear to be a git repository?

Note: The “fatal: 'origin' does not appear to be a git repository” error occurs when you try to push code to a remote Git repository without telling Git the exact location of the remote repository. To solve this error, use the git remote add command to add a remote to your project.

Does not appear to be a git repository but it is?

The “… does not a appear to be a git repository” error is triggered when you try to clone, or run other commands, in a directory that is not recognized as a Git repository. The directory or remote file path might not have initialized Git, or the file path you are trying to access as an active repository is incorrect.

What is upstream repository in git?

In the git world, upstream refers to the original repo or a branch. For example, when you clone from Github, the remote Github repo is upstream for the cloned local copy.


1 Answers

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.

like image 182
Rattle Avatar answered Sep 20 '22 13:09

Rattle