我在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复制/分叉到同一个组织中
发布评论