Reputation: 1651
I am trying to duplicate an existing repository. I have a project called Test and I would like to create a duplicate of it called Test1. The reason I don't just want to create another branch of it is because the new repo will have a different UI (replacing Angular with React) and don't want any branching dependencies to the old one.
I am an admin on Gitlab but I only see options to Move and Delete repo but no Copy repo. This is inside a corporate's infrastructure so I don't have access to the command line git tools but I am admin in Gitlab.
Upvotes: 6
Views: 6266
Reputation: 2093
You could clone the repository and push it to a different remote (which you would create manually on the server):
https://gitlab.example.com/user/Test1
)git clone --mirror https://gitlab.example.com/user/Test
cd Test # optionally rename the directory if you want to keep it
git remote remove origin
git remote add origin [email protected]:user/Test1
git push --all origin
git push --tags origin
Test1
(make sure you change both the path and the name)Upvotes: 7