Blog is moving

My blog is moving to http://victormendonca.com/blog/. If you are looking for a specific or older post you are in the right place Otherwise check out my new page for more up to date content.

Friday, November 7, 2014

How to Export/Import a GitLab Project

Important note: Please make sure you have a backup. I'm not a git expert and I have only tried this once
1- Clone the project
$ git clone http://[user]:[password]@[server]/[namespace]/[project].git
2- cd into the new created directory and create a bundle
$ git bundle create [project].bundle --all
3- Create a new project on the new server UI
4- Clone the new empty project
$ git clone http://[user]:[password]@[server]/[namespace]/[project].git
Initialized empty Git repository in /home/mendonca_v/Git/[project]/.git/
warning: You appear to have cloned an empty repository.
5- Change into that new project
$ cd [project]
6- Pull the bundle into that project
$ git pull ../common-impl/common-impl.bundle master
Note: When you do 'git status' no changes will be shown
$ git status
# On branch master
nothing to commit (working directory clean)
7- Push the contents to the new server
$ git push -u origin master

1 comment:

Anonymous said...

Thanks mate :)