使用所有分支恢复 gitlab 备份存储库捆绑文件

kan*_*nix 1 git gitlab git-bundle

我需要从 gitlab 备份中恢复一些存储库。此备份包含所有存储库的 .bundle 文件。如何恢复包含所有分支的完整存储库?

如果我跑,git bundle list-heads myfile.bundle我可以看到所有的分支。

我想使用所有分支在本地恢复该 repo,以将其推送到新的/空的 gitlab 存储库。

我尝试使用 git clone、git pull 我能找到的所有其他技巧,但这只会导致一个只有 master 分支的 repo。

Von*_*onC 5

如果捆绑包是使用所有分支创建的,您应该能够在 a 之后看到所有分支git clone --mirror

git clone --mirror /path/to/your/bundle yourRepo.git
Run Code Online (Sandbox Code Playgroud)

请注意,.git因为 --mirror 会创建一个裸 repo