fatal: ‘origin’ does not appear to be a git repository

Question:

I’ve a repository moodle on my Github account which I forked from the official repository.

I then cloned it on my local machine. It worked fine. I created several branches (under the master branch). I made several commits and it worked fine.

I don’t know how I’m getting the following error when I do : git push origin master

How do I resolve the error without effecting my repository on Github?

I’m using Ubuntu 12.10

The contents of my .git/config after doing cat $(git rev-parse --show-toplevel)/.git/config gives:

Answer:

$HOME/.gitconfig is your global config for git.
There are three levels of config files.

(mentioned by bereal) is your local config, local to the repo you have cloned.

you can also type from within your repo:

And see if there is any remote named ‘origin’ listed in it.

If not, if that remote (which is created by default when cloning a repo) is missing, you can add it again:


The OP mentions:

Doing git remote -v gives:

So ‘origin‘ is missing: the reference to your fork.
See “What is the difference between origin and upstream in github

enter image description here

Leave a Reply