Gitlab:将项目复制到其他Git实验室存储库 [英] Gitlab: copy project to other git lab repository

查看:667
本文介绍了Gitlab:将项目复制到其他Git实验室存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将gitlab项目复制到与原始项目完全独立的其他存储库中.

I want to copy a gitlab project to other repository which be completely independent from original project.

由于这个原因,我尝试将原始项目分叉到另一个项目中.但是在原始项目中,维护人员仍然可以看到派生列表,并且知道其他派生在哪里维护.

For this reason I tried forking original project into another project. But inside original project, maintainer still can see list of forks and knows where is other forks are maintained.

我想要一个没有主项目任何链接的完整副本,所以它不能由原始项目维护者管理.

I want to have a complete copy without any link to main project so it cannot be managed by original project maintainer.

我该怎么做?

推荐答案

我会将原始项目克隆到本地计算机上的沙箱中,在所需的位置创建新项目,将新的gitlab位置设置为远程并推送在那里.

I would clone the original project in a sandbox on your local machine, create the new project where you want it, set your new gitlab location as the remote and push there.

假设old_url和new_url是您的新旧URL:

Assuming old_url and new_url are your old and new URLs:

git clone <old_url>
cd <repo_dir_name>
git remote add new_remote <new_url>
git push --all new_remote

假设新存储库在您执行此操作时为空,那么它将包含原始存储库中存在的所有分支和标签,而与之没有任何连接.

Assuming your new repo was empty when you did this, it will now contain all the branches and tags that exist in the original repo, without any connections to it.

这篇关于Gitlab:将项目复制到其他Git实验室存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆