Gitlab: copy project to other git lab repository

前端 未结 3 1883
余生分开走
余生分开走 2020-12-10 18:57

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

For this reason I tried forking original

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 19:10

    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.

    Assuming old_url and new_url are your old and new URLs:

    git clone 
    cd 
    git remote add new_remote 
    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.

提交回复
热议问题