Reputation: 1124
I have a Gitlab CE 11.7 docker running on my server. When I import a project from gitlab.com, its wiki is missing. I use the built-in interface to import the projects:
New Project > Import project [tab] > GitLab.com [button]
then I choose the repository to import from a list of repositories connected to my account.
Is there a way to migrate the wiki of a repository from Gitlab.com to a GitLab CE instance?
Upvotes: 8
Views: 9147
Reputation: 1323115
Wikis are repos as well. You can clone a projec
And with GitLab 17.1 (June 2024), you now have an easier and quicker cloning with a new wiki repository clone button.
See Documentation and Issue.
Upvotes: 1
Reputation: 2448
The valid answer is just what I needed. I still want to share the whole process to get the migration done is a few steps. I have a dedicated git server but you can use http.
git clone [email protected]:myGroup/myRepo.wiki.git
git remote rename origin oldorigin
git remote add origin [email protected]:myGroup/myRepo.wiki.git
git fetch origin
git push --force
Force is necessary as there will not be common points in the imported history.
Upvotes: 8
Reputation: 2541
Wikis are repos as well. You can clone a project by doing:
git clone https://gitlab.com/{namespace}/{project}.wiki.git
If you click the "Git Access" link at the top in your wiki, you also get this URL.
Since it is a repo you can then push to the desired destination wiki.
Upvotes: 16