I\'m trying to push my project (all files in a new repository). I follow the steps but when I push with git push -u origin master
I get this error:
I had this problem on a development machine. The dev
branch was pushing fine but the
the master
branch gave me (while git push
ing when being on the dev
branch):
! [rejected] master -> master (non-fast-forward)
So I tried:
git checkout master
git pull
Which gave me:
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either.
I found out the master branch was missing from .git/config
and added:
[branch "master"]
remote = origin
merge = refs/heads/master
Afterwards git push
also worked fine on the dev
branch.