Skip to content

Instantly share code, notes, and snippets.

@paulgregg
paulgregg / README.md
Last active February 6, 2024 09:34
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
@paulgregg
paulgregg / dirsunique.pl
Created October 26, 2014 13:15
Extract unique subdirectories from a file, ignoring parent dirs
#!/usr/bin/perl
# pgregg@pgregg.com
use Data::Dumper;
my $d={};
while(<STDIN>) {
chomp;
next if(/^$/);
@bits = split(/\//, $_);
$last = pop(@bits);
$dr = $d;