Skip to content

Instantly share code, notes, and snippets.

@yushine
Forked from paulgregg/README.md
Created December 6, 2021 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yushine/cda0718e2562b2fe5c777e62fd9b2d15 to your computer and use it in GitHub Desktop.
Save yushine/cda0718e2562b2fe5c777e62fd9b2d15 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