一、删除原有远程仓库地址
git remote rm origin
二、添加新的仓库地址
cd existing_repo git remote add origin <URL> git push -u origin --all git push -u origin --tags
三、迁移
git clone --mirror <URL to my OLD repo location> cd <New directory where your OLD repo was cloned> git remote set-url origin <URL to my NEW repo location> git push -f origin