问题
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