一、第一步

把服务器上得所有分支和tag先拉取到本地

  • 拉去分支到本地

    git branch -a 查看所有的分支

    git checkout branch-name 检出指定分支到本地

  • 拉去所有的TAG 到本地

    git fetch --tags

二、 更换远端资源连接到新的连接
  • git remote rm origin 清除本地和远端的资源连接
  • git remote add origin <url to NEW repo> 建立新的连接
三、把本地的资源推到新仓库
  • git push origin --all
  • git push --tags

相关文章:

  • 2022-02-09
  • 2021-07-16
  • 2021-10-15
  • 2021-07-20
  • 2021-07-07
  • 2021-06-05
猜你喜欢
  • 2022-12-23
  • 2021-08-31
  • 2021-05-07
  • 2022-12-23
  • 2021-06-09
相关资源
相似解决方案