- 在Github建立空的repo,不要勾选 README.md 选项
在本地进入到准备推送的项目目录中
touch README.md
git init
git add .
git commit -m "xxx"
git remote add origin https://github.com/username/players.git
git push -u origin master
以上作业之前总是加了git clone github_url,后面就不对了,因为这个是在本地没有git仓储的情况下才需要。
如果是把本地推送,就是先在本地建立仓库(cmd 1-4), 然后用git remote add 讲本地仓库和远程挂上,然后push就可以了。
スクリーンショット 2018-10-10 20.43.44.png
本来是很简单的步骤,之前总是习惯性git clone。。。
参考:
https://blog.csdn.net/north1989/article/details/53471439