GIT: fatal: 'master' does not appear to be a git repository

And it worked but said

Branch master set up to track remote branch master from origin.

Do a git config --local -l

You will see that the local branch master is set to track the upstream branch origin/master

See "Difference between git checkout --track origin/branch and git checkout -b branch origin/branch".

It would be like you did:

git config branch.master.remote origin
git config branch.master.merge refs/heads/branch

The first push needs that upstream information: see "Why do I need to explicitly push a new branch?".


I was getting the same error while doing git pull <branch>, and I fixed it by changing that to git pull origin <branch>.