命令行
# 如果本地没有旧仓库的话先 clone
git clone <旧仓库地址>
cd old-rep
# 从默认远程仓库拉取所有分支的提交记录
git fetch --all
# 添加新的远程仓库地址
git remote add new-origin <新仓库地址>
# 推送所有分支和提交记录到新仓库,不包含标签
git push new-origin --all
# 推送所有标签(如果有)到新仓库
git push new-origin --tags
# 将原来的 origin 改名为 old-origin
git remote rename origin old-origin
# 将新仓库改名为 origin
git remote rename new-origin origin
TortoiseGit
下次迁移再试。
评论区