Importing Gitlab Wiki to new Gitlab instance

落爺英雄遲暮 提交于 2020-01-11 03:24:05

问题


Trying to deploy a new wiki into gitlab from a previous gitlab server.

I know how to create a bundle file:

git bundle create wiki.bundle --all

This gives me a bundle file of my wiki (called wiki.bundle) and when opened there is a lot of markdown files that correspond to the wiki repository. When I try to import it into the new project there are two repository types for the repository. For example, let's say the new wiki is called "new wiki"; this would yield two files in the filesystem: new-wiki.git and new-wiki.wiki.git

Previously, my work around has been issuing a git clone and git pull of the markdown bundle into my new-wiki.git file; I then retrieve the "files" and manually import them over to the wiki one at a time. This can be very time consuming and not all that practical.

I did try the same operation with the new-wiki.wiki.git but nothing appears to happen.

Has anyone run into this problem and found a resolution for something like this? I know I can get it to work, but is there a more convenient way?


回答1:


I thought I would just put this down in case it helps anyone.

The method that seemed to solve my problem was:

mkdir new-wiki
cd new-wiki
git init
git remote add origin http://gitlab-server-ip/account-name/new-wiki.wiki.git
git pull wiki.bundle
git push -u origin master

The problem I had was there was no real "feedback" that anything was happening. When I go into the gitlab dashboard it shows nothing either. Only by going directly into the project I can see that it is newly populated. Hope this is of some sort of help to someone.



来源:https://stackoverflow.com/questions/24491535/importing-gitlab-wiki-to-new-gitlab-instance

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!