Algorithm:https://blog.youkuaiyun.com/fxdaniel/article/details/88960081
Review:https://blog.youkuaiyun.com/fxdaniel/article/details/88977617
Tip:将本地已有的git仓库关联到一个新的远程仓库:
cd existing_git_repo
git remote rename origin old_origin #将原来的origin仓库重命名成old_origin,仅本地修改,不影响远程
git remote add <new-remote-repo-url> #将本地仓库关联到新远程库,此时git remote -v能看到本地仓库有两个远程仓库,一个是old_origin,一个是origin
git push -u origin --all #将本地所有代码推送到新的远程库
git push -u origin --tag #将本地所有tag推送到新的远程库
Share:最近在学习容器网络知识,看到耗子叔的这篇文章很有借鉴意义。
https://coolshell.cn/articles/18654.html
本文提供了一种简单的方法来将本地已有的Git仓库关联到一个新的远程仓库,并详细介绍了具体步骤,包括如何重命名原有的远程仓库、添加新的远程仓库地址以及推送所有代码和标签。
378

被折叠的 条评论
为什么被折叠?



