Using a Git bundle
In the last example, we saw how we could create bundles from the existing history, which contains a specified range of history. Now, we'll learn how to use these bundles either to create a new repository or to add a history to an existing one.
Â
Getting ready
We'll use the same repository and methods as in the last example to create bundles, but we'll recreate them in this example to be able to use them one at a time. First, we'll prepare the repository and the first bundle, as shown in the following commands:
$ rm -rf offline-sharing $ git clone https://github.com/PacktPublishing/Git-Version-Control-Cookbook-Second-Edition_offline-sharing.git $ cd Git-Version-Control-Cookbook-Second-Edition_offline-sharing $ git checkout master Branch master set up to track remote branch master from origin by rebasing. Switched to a new branch 'master' $ git bundle create myrepo.bundle master Counting objects: 12, done. Delta compression using up to 8 threads. Compressing objects:...