Message 'src refspec master does not match any' when pushing commits in Git

前端 未结 30 1762
轮回少年
轮回少年 2020-11-22 02:49

I clone my repository with:

git clone ssh://xxxxx/xx.git 

But after I change some files and add and commit them,

30条回答
  •  感情败类
    2020-11-22 02:53

    This happens too when you are in a specific branch and try to push another branch that does not exist yet, like:

    $ git branch
    * version-x  # you are in this branch
      version-y
    
    $ git push -u origin master
    error: src refspec master does not match any.
    error: failed to push some refs to 'origin_address'
    

提交回复
热议问题