(1)初始化本地仓库git init
(2)和远程仓库建立连接git remote add origin https://github.com/xxx/xxx.git
(3)如果远程仓库已经存在git remote
rm
origin,然后重新执行(2)
(4)获取远程仓库git pull origin master --allow-unrelated-histories
(5)更新远程仓库git push origin master
原文:https://www.cnblogs.com/gris/p/12548895.html