原文:https://blog.csdn.net/a987625922/article/details/82189863
- 新建远程仓库(github或者gitee)
-
将本地仓库转换成版本库,并将文件添加到版本中:
-
cd your-project/
-
git init
-
git remote add origin 远程仓库地址
-
git add . // .前有空格
- git commit -m “初始化"
-
6.git push -u origin master
-
关联远程仓库:
git remote add origin <URL>
-
拉取远程仓库文件:
git pull origin master --allow-unrelated-histories
-
推送本地到远程仓库:
git push -u origin master