Push private Git repositories to your own machine, browse them, and freeze the projects you no longer want on your Mac.
Cryobank has three executables:
cryobankruns the SSH endpoint and web browser.git-freezemakesgit freezework.git-thawmakesgit thawwork.
There are no users, pull requests, issues, actions, or database. Bare Git repositories hold everything.
Caution
git freeze ends by moving your checkout to the macOS Trash. Cryobank
verifies the upload first, but start with a project you can afford to lose.
Install Go and Git, then build the three executables:
$ make test
$ sudo make installSet PREFIX if /usr/local is not on your PATH:
$ make install PREFIX="$HOME/.local"Install Cryobank on your Mac and the SSH host.
Choose the directory that will hold the bare repositories:
$ cryobank init /Volumes/Tundra/Cryobank
Cryobank root configured at /Volumes/Tundra/CryobankUse a dedicated SSH key. Add it to ~/.ssh/authorized_keys on the host with a
forced command:
command="/usr/local/bin/cryobank shell",restrict ssh-ed25519 AAAA... cryobank
Add an SSH alias on your Mac:
Host cryobank
HostName pangolin.local
IdentityFile ~/.ssh/id_ed25519_cryobankTell the Git commands which host to use:
$ git config --global cryobank.host cryobankThe forced SSH command resolves repository names inside the configured root. The first push creates the bare repository.
$ git remote add cryobank cryobank:weekend-compiler.git
$ git push -u cryobank main
$ git clone cryobank:weekend-compiler.gitFreeze the current checkout:
$ git freeze
Froze /Users/me/Code/weekend-compiler to cryobank as weekend-compiler and moved it to Trash.Before touching the checkout, Cryobank:
- Captures all refs, stashes, staged changes, unstaged changes, and untracked files that Git does not ignore.
- Uploads a resumable Git bundle over SSH.
- Verifies its checksum and every ref on the host.
- Checks that the checkout did not change during the upload.
- Calls the macOS
/usr/bin/trashcommand.
Cryobank does not upload ignored files. They often contain builds, dependencies,
caches, or secrets. git freeze moves them to Trash with the checkout, and
git thaw cannot restore them.
Bring a project back with:
$ git thaw weekend-compilerThaw restores the branch, file contents, untracked files, and stash refs. Staged and unstaged changes return as unstaged changes. Pass a second argument to choose the checkout path:
$ git thaw weekend-compiler ~/Code/compilerStart the read-only web UI on the host:
$ cryobank serve
Serving /Volumes/Tundra/Cryobank on http://127.0.0.1:9418Forward it to your Mac:
$ ssh -N -L 9418:127.0.0.1:9418 pangolin.localOpen http://127.0.0.1:9418. The project feed marks repositories as active,
frozen, or deep archive. A frozen project becomes deep archive after 180 days.
Repository pages show branches, recent commits, trees, and files.
Warning
The web UI has no authentication. Keep it on localhost and use an SSH tunnel, VPN, or trusted reverse proxy.
The configured root contains ordinary bare repositories:
Cryobank/
├── weekend-compiler.git/
├── old-homebrew.git/
└── .uploads/
Back up that whole directory. The .uploads directory contains resumable
transfers and can be discarded when no freeze is running.