克隆当前仓库 不知道如何克隆?查看帮助 。
HTTPSSSH
从命令行创建一个新的仓库
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://agit.ai/lizz2276/helloworld.git
git push -u origin master
从命令行推送已经创建的仓库
git remote add origin https://agit.ai/lizz2276/helloworld.git
git push -u origin master
git push origin master提示
error:src refspec master does not match any
问题产生原因分析
引起该错误的原因是,目录中没有文件,空目录是不能提交上去的,而且在push之前至少有过一次commit
解决方法
在目录下先建个README文件
git init
git touch READMEgit
git add README
git commit -m 'first commit'
git remote add origin https://github.com/xxx.github.io.git
git push origin master
作者:MachinePlay
链接:https://www.jianshu.com/p/40ffdd0654f4
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。