Some good git stuff…
Today I found myself needing to move some commits between two repositories. In general the best way to do this is by pulling changes from one into the other, but in this case the repositories did not have direct access to each other. Rather than copying an entire repository from one machine to another or mucking about with a pile of patches, we can save time by performing the sending and receiving sides of the network-enabled
git fetch command by hand.
In the source repository, add the changes we want to move to a bundle that we can copy to a USB stick:
In the destination repository, ensure that we have the commits necessary to use the bundle and then tell
git fetch to grab the changes from it: