Skip to content

Instantly share code, notes, and snippets.

@tsohr
Created April 8, 2020 02:30
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 tsohr/0b14ab6ae5a50f2fb55b5e8f2d526afa to your computer and use it in GitHub Desktop.
Save tsohr/0b14ab6ae5a50f2fb55b5e8f2d526afa to your computer and use it in GitHub Desktop.
Importing bunch of git bundle files into gitlab
#I'm using gitlab-ce docker image, at this moment: 04/2020
#cd: /var/opt/gitlab/git-data/repositories
#locating .bundle files here
find . -type f | grep -i '.bundle' | while read i; do
dir=`dirname "$i"`;
pushd "$dir";
git clone `basename "$i"` --bare;
popd;
done
# .bundle -> .git
chown git:git * -R
gitlab-rake gitlab:import:repos['/var/opt/gitlab/git-data/repositories/repository-import-20200408']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment