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

前端 未结 30 2112
轮回少年
轮回少年 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 03:04

    If you get this error while working in detached HEAD mode, you can do this:

    git push origin HEAD:remote-branch-name
    

    See also: Making a Git push from a detached head

    If you are on a different local branch than the remote branch, you can do this:

    git push origin local-branch-name:remote-branch-name
    

提交回复
热议问题