Skip to content

Instantly share code, notes, and snippets.

@schmitch
Forked from paulgregg/README.md
Created August 9, 2021 07:44
Show Gist options
  • Save schmitch/05eae05de70ef18734cba9ec37422847 to your computer and use it in GitHub Desktop.
Save schmitch/05eae05de70ef18734cba9ec37422847 to your computer and use it in GitHub Desktop.
Converting a gitlab export to simple git repo

Converting a gitlab export to simple git repo

Gitlab exports a tar.gz file which contains a file called project.bundle. We can convert this file into a normal git repo using the following steps:

Extract the project.bundle file

$ tar xvfz GitLabExport.gz
x ./
x ./project.bundle
x ./project.json
x ./VERSION

$ ls -l project.bundle
-rw-r--r--@ 1 pgregg  pgregg  69055 21 Dec 12:06 project.bundle

Restore the bundle to git repo

$ mkdir repo
$ git clone --mirror project.bundle repo/.git
$ cd repo
$ git init
$ git checkout

Check contents

$ git status
On branch master
nothing to commit, working tree clean
$ ls
README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment