object.io

All code has costs. Only some code has value.

The sneakernet in git

There are many ways to backup a git repository and shuttle sets of changes around. If you just want an offline copy for safe-keeping, this method is very simple and convenient:

1
$ git bundle create blog-dump.bundle master

This creates a file blog-dump.bundle with the full history for master, including all parent commits. You now have a single file, which can effectively be mailed, downloaded via SCP or FTP, or simply moved to Dropbox (affiliate link) for safe keeping, or otherwise shared with others.

Single files are easy to archive and backup.

Thawing a bundle

When you want to restore from such a bundle backup, you simply clone from it. The steps include creating a new repository, and then pulling from the bundle, like you would a remote repository:

1
2
$ git init
$ git pull blog-dump.bundle master

Your repository now holds all commits that were stored in the bundle. For more usage-scenarios see the official git bundle help or just type:

1
$ git bundle --help