fatal: The current branch master has no upstream branch

后端 未结 23 2287
误落风尘
误落风尘 2020-11-30 16:46

I\'m trying to push one of my projects to github, and I keep getting this error:

peeplesoft@jane3:~/846156 (master) $ git push

fatal: The current branch mas         


        
23条回答
  •  青春惊慌失措
    2020-11-30 17:07

    There is a simple solution to this which worked for me on macOS Sierra. I did these two commands:

    git pull --rebase git_url(Ex: https://github.com/username/reponame.git)
    git push origin master
    

    If it shows any fatal error regarding upstream after any future push then simply run :

    git push --set-upstream origin master
    

提交回复
热议问题