I don't find git-bundle
a good idea for maintaining a backup of your repository. Either create a bare repository and push onto it the refs you wish to track in your backup, or use good old tarballs. The difference between the two is that pushing allows you to back up only selective branches. For example, you might wish to ignore scratch branches in your backups. Zipping your repository will bluntly back up absolutely everything -- including your stash, untracked files, object files and any temporary editor files.
I usually just zip the whole thing. You might run git-clean -fdxn
and then git-clean -fdx
to carefully wipe out everything that's not stored in your repository. If you really insist on size efficiency when you perform the backup (and you shouldn't; just let Git worry about this), then you can garbage-collect before your backup, and maybe even prune your reflog. But you know, I wouldn't. Storage is cheap these days, and by doing so you merely lose on the backup's value.