22

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!

Darkglow
  • 683
  • 2
  • 8
  • 18

3 Answers3

33

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.

Daisy Leigh Brenecki
  • 7,571
  • 6
  • 28
  • 43
  • Thanks a lot, i'll try it as soon as we have our gitlab up and running. – Darkglow Feb 25 '14 at 11:58
  • in general this worked, but i had to make some extra stuff, actually it is, because it is a own repository, it works as follows: [link](http://stackoverflow.com/questions/5181845/git-push-existing-repo-to-a-new-and-different-remote-repo-server) – Darkglow Apr 01 '14 at 11:40
  • Isn't that basically the same thing as my answer, except using remote aliases? – Daisy Leigh Brenecki Apr 02 '14 at 21:06
  • The problem with this approach is that gitlab uses different file name conventions and markdown formatting from github. Many of my wiki pages didn't port over nicely. Some didn't work at all. – joseph.hainline May 10 '15 at 02:21
  • I was able to use this to migrate across `GitHub` instances too! This doesn't have to be just for `GitLab`. – Elliot Huffman Sep 06 '21 at 14:23
2

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

joseph.hainline
  • 24,829
  • 18
  • 53
  • 70
0

Gitlab and github deal with images differently. I am trying to migrate gitlab wiki to github while I found treat the wiki as normal repo will miss all the images in github. That is because the images are NOT stored in the repo of gitlab.

tibalt
  • 77
  • 6