1.cd到你的本地项目路径下
2. git init(初始化git容器,在内部会生成.git文件夹)
3.将码云中新建好的空项目的路径拷贝,并执行git remote add origin + 你刚刚在码云复制的那行路径
4.注意:git pull origin master --allow-unrelated-histories,将码云上的仓库pull到本地文件夹
(首先需要pull,发现refusing to merge unrelated histories,因为两个仓库提交历史不一致,无法pull拉取远程信息,所以需要在GIT命令中添加一句代码:--allow-unrelated-histories允许不相关历史进行提交,代码是在git 2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories)
5.git add .
6.git commit -m '提交信息'
7.git push origin master
git pull -f origin master
git push -f origin master
强制push