当git远程仓库变更地址,我们需要重新关联远程仓库
1.不要之前的提交记录
删除本地.git文件夹
git init
git add -A
git commit -m "first commit"
git remote add origin https://git.coding.net/**/**.git
git push -u origin master
2.若要保存之前的提交记录
git remote rm origin
git remote add origin https://git.coding.net/**/**.git
git pull origin master --allow-unrelated-histories
若有冲突请重新
git add -A
git commit -m "init"
git push origin master
或者
git remote origin set-url https://git.coding.net/**/**.git
git pull origin master --allow-unrelated-histories
若有冲突请重新
git add -A
git commit -m "init"
git push origin master