restore gitlab backup repository bundle file with

2019-02-11 12:31发布

问题:

I need to restore some repositories from an gitlab backup. This backup contains .bundle files for all the repos. How can I restore the complete respository with all branches in it?

If I run git bundle list-heads myfile.bundle I can see all the branches.

I want to restore that repo locally with all branches to push it to a new/empty gitlab repository.

I've tried to use git clone, git pull all other tricks i could find but that only leads to a repo with only the master branch in it.

回答1:

If the bundle was create with all branches, you should be able to see all the branches after a git clone --mirror:

git clone --mirror /path/to/your/bundle yourRepo.git

Note the .git since the --mirror would create a bare repo.