1如果本地项目中已有.git文件,先删掉
rm -rf .git
2.创建本地仓库
git init
3.添加
git add .
4.提交到本地仓库并添加注释
git commit -m “first-commit”
5.链接远程仓库
这个远程仓库是你在github上创建的得到的https://github.com/xxx/my_modal.git
git remote add origin https://github.com/xxx/my_modal.git
6.推送到远程仓库
git push origin master