0

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

gallygator
  • 377
  • 1
  • 4
  • 16

1 Answers1

0
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
Community
  • 1
  • 1
Ashutosh Jindal
  • 18,501
  • 4
  • 62
  • 91
  • FYI - with git version 2.3.5, I see no effect for the `--all`. option, whereas one might think it includes 'all' branches, it does not. – gallygator Oct 06 '16 at 03:43