将github上的git repo复制/分叉到同一个组织中

编程入门 行业动态 更新时间:2024-10-26 04:28:18
本文介绍了将github上的git repo复制/分叉到同一个组织中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在github上有一个仓库,其中包含一个部署到两个不同域的Web应用程序。该应用程序在这里和那里的逻辑分支略有不同,具体取决于部署到哪个域。

I have a repo on github that contains a web application that's deployed to two different domains. The application has slight logic forks here and there to behave differently depending on which domain it's deployed to.

现在我想将它分成两个单独的位置repos,每个域名一个。

It's come to the point to where I want to split it into two separate repos, one for each domain.

Github不会让我把它分成同一个组织。搜索git duplicate repo表明我应该克隆和镜像推送它,但这似乎是为了保持两个同步的回购,我不想这样做。

Github won't let me fork it into the same organization. Searching for "git duplicate repo" suggests I should bare clone and mirror push it, but that seems to be for keeping both repos in sync, which I don't want to do.

最好的办法是什么?如果可能的话,我希望在新副本中保留旧的提交历史记录。

What's the best way to go about this? I'd like to preserve the old commit history in the new copy if possible.

推荐答案

只需创建一个新的存储库,它从你的工作副本:

Just create a new repository and push to it from your working copy:

git clone git@github:me/myrepo-original cd myrepo-original git remote set-url origin git@github:me/myrepo-new git push origin master

现在您有一个新的存储库 myrepo-new ,它与 myrepo-original 。

Now you have a new repository, myrepo-new, which is identical to myrepo-original.

更多推荐

将github上的git repo复制/分叉到同一个组织中

本文发布于:2023-07-04 17:25:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1027057.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:组织   github   git   repo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!