I have a git repository that i have packed with git repack -a -d, this repacked all the objects into one big file. This saves space. However I want to undo this, and turn that one big pack file into all the little object files.
The reason I want to do this is to backup the git repository to a remote server. I did a backup (before repacking). Installing git on the remote server is nontrivial, so I was going to use rsync to copy the files. However rsync is not this clever and will basically want to copy things again. If I can ‘unpack’ this repository, it might make it quicker to copy.
git-unpack-objects will unpack the objects, but only inside a repo that doesn’t contain the pack:
Make a new, empty repo:
Write the objects in:
Pull the necessary branches/tags in:
Or, if you’re adventurous, you could attempt to use the objects directory in
new-repoas a replacement for the old one.