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

前端 未结 30 2256
轮回少年
轮回少年 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:07

    For me,following worked to move untracked files:

    git add --all
    

    Next, I followed similar steps

     git commit -m "First commit"
    

    Then,

    git remote add origin git@github.....
    

    Last but not the least:

    git push -u origin master
    

    As you do this, Windows security will pop up asking for your username and password.

提交回复
热议问题