I want a simple way to back up my git repos, so I'm considering git bundle
.
I am presently unable to confirm that I can recover the full content of a bundled branch(es) relying on a *.bundle
file. I'm confused, because I notice talk about "deltas" being saved, maybe not other content.
Can someone please confirm that git bundle
is a suitable approach for backing up projects, that is, no work will be lost.
Thanks,
G
git bundle create /tmp/foo-all --all
This results in a single file.
See ProGit: little bundle of joy.
See also "How can I email someone a git repository?"
Note that this does not backup hook scripts and that this is by design since the hook scripts might contain sensitive information.
For using that bundle, you can clone it:
git clone /tmp/foo-all newFolderOutsideAnyGitRepo