Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Git Version Control Cookbook
  • Toc
  • feedback
Git Version Control Cookbook

Git Version Control Cookbook

By : Olsson, Voss
4 (3)
close
Git Version Control Cookbook

Git Version Control Cookbook

4 (3)
By: Olsson, Voss

Overview of this book

This practical guide contains a wide variety of recipes, taking you through all the topics you need to know about to fully utilize the most advanced features of the Git system. If you are a software developer or a build and release engineer who uses Git in your daily work and want to take your Git knowledge to the next level, then this book is for you. To understand and follow the recipes included in this book, basic knowledge of Git command-line code is mandatory.
Table of Contents (14 chapters)
close
13
Index

Creating Git bundles


Another method to share the repository history between repositories is to use the git bundle command. A Git bundle is a series of commits that can work as a remote repository, but without having the full history of a repository included in the bundle.

Getting ready

We'll use a fresh clone of the offline-sharing repository as follows:

$ git clone https://github.com/dvaske/offline-sharing.git
$ cd offline-sharing
$ git checkout master

How to do it...

First, we'll create a root bundle, as shown in the following command, so that the history in the bundle forms a complete history and the initial commit is also included:

$ git bundle create myrepo.bundle master
Counting objects: 12, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (12/12), 1.88 KiB | 0 bytes/s, done.
Total 12 (delta 1), reused 0 (delta 0)

We can verify the bundle content with git bundle verify:

$ git bundle verify myrepo.bundle
The bundle contains this...
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete