Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrate or export Github wiki to Gitlab

Currently we are working with github and we are actually quiet happy with it. But the costs will grow more and more in near future. Now we've started evaluating other git solutions and stumbled over gitlab, and i've to say, it looks very interesting for us. I've seen that there is as well a wiki feature similar to github. But one important thing is nowhere described...

The only thing i've found is this two year old entry https://groups.google.com/forum/#!msg/gitlabhq/YSM_Il9yk04/_-ybpN4BekYJ

Does anybody know if there are any news in that matter? it looks like it is possible, but how? is there any manual or howto that could help me?

Thanks a lot!

like image 688
Darkglow Avatar asked Feb 24 '14 15:02

Darkglow


People also ask

Does GitLab have a wiki?

If you don't want to keep your documentation in your repository, but you want to keep it in the same project as your code, you can use the wiki GitLab provides in each GitLab project. Every wiki is a separate Git repository, so you can create wiki pages in the web interface, or locally using Git.

What is the primary non functional difference between the import from GitLab export and the GitHub bitbucket importers?

The GitLab also provides the functionality of free public repositories to the users. There is no such functionality in the Bitbucket platform. In the GitHub platform, the user can ask for merge requests or issue templates. In the GitLab platform also the user can ask for merge requests or issue templates.

How do I clone a wiki from GitHub?

The Wiki pages are managed as a repository. So click on your repository, then on the left side click on Wiki. Finally on the upper right corner click on Clone Repository. There you will clear instructions on how to clone it correctly.

Where is GitLab wiki stored?

Where files are stored. Attach a file, and GitLab stores it according to your installed version of GitLab: Files added in GitLab 11.3 and later: Files are stored in the wiki's Git repository. Files added GitLab 11.2 and earlier: Files are stored in GitLab itself.


2 Answers

Github wikis and GitLab wikis are both just Git repositories containing text files, so you can just pull from one and push to the other.

Go to any page on your Github wiki and click the Clone URL button. You'll get a URL like https://github.com/Homebrew/homebrew.wiki.git. Clone it to your computer:

git clone https://github.com/Homebrew/homebrew.wiki.git
cd homebrew.wiki

Then, on your GitLab wiki, click the Git Access tab, find the URL in the instructions (in the first line under the Clone Your Wiki heading), and push to that URL:

git push https://gitlab.com/adambrenecki/test-project.wiki.git

If you can't find the URLs, they should be roughly the same as on this page, with the usernames/repo names changed as appropriate.

like image 63
Leigh Brenecki Avatar answered Oct 08 '22 07:10

Leigh Brenecki


I had this problem with over 100 repos with their wikis that I was porting from github to gitlab. I created a few scripts to change the file names and markdown link formatting for the wikis, and to port over all branches and tags. It works, but it's only a 90% solution for the wikis.

https://gist.github.com/josephhainline/b37c5fab8a4bcd6e441e

To run it:

$ port_repos_and_wikis_from_github_to_gitlab.sh MyGithubGroup MyGitlabGroup MyRepo

like image 44
joseph.hainline Avatar answered Oct 08 '22 06:10

joseph.hainline