Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development

( 8 )


Get up to speed on Git for tracking, branching, merging, and managing code revisions. Through a series of step-by-step tutorials, this practical guide takes you quickly from Git fundamentals to advanced techniques, and provides friendly yet rigorous advice for navigating the many functions of this open source version control system.

This thoroughly revised edition also includes tips for manipulating trees, extended coverage of the reflog and stash, and a complete introduction to...

See more details below
Paperback (Second Edition)
$26.69 price
(Save 27%)$36.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (20) from $20.04   
  • New (15) from $20.74   
  • Used (5) from $19.71   
Version Control with Git: Powerful tools and techniques for collaborative software development

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$17.99 price
(Save 43%)$31.99 List Price


Get up to speed on Git for tracking, branching, merging, and managing code revisions. Through a series of step-by-step tutorials, this practical guide takes you quickly from Git fundamentals to advanced techniques, and provides friendly yet rigorous advice for navigating the many functions of this open source version control system.

This thoroughly revised edition also includes tips for manipulating trees, extended coverage of the reflog and stash, and a complete introduction to the GitHub repository. Git lets you manage code development in a virtually endless variety of ways, once you understand how to harness the system’s flexibility. This book shows you how.

  • Learn how to use Git for several real-world development scenarios
  • Gain insight into Git’s common-use cases, initial tasks, and basic functions
  • Use the system for both centralized and distributed version control
  • Learn how to manage merges, conflicts, patches, and diffs
  • Apply advanced techniques such as rebasing, hooks, and ways to handle submodules
  • Interact with Subversion (SVN) repositories—including SVN to Git conversions
  • Navigate, use, and contribute to open source projects though GitHub
Read More Show Less

Product Details

  • ISBN-13: 9781449316389
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 8/27/2012
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 456
  • Sales rank: 248,033
  • Product dimensions: 6.90 (w) x 9.10 (h) x 1.00 (d)

Meet the Author

Jon Loeliger is a freelance software engineer who contributes to Open Source projects such as Linux, U-Boot, and Git. He has given tutorial presentations on Git at many conferences including Linux World, and has written several papers on Git for Linux Magazine.

In prior lives, Jon has spent a number of years developing highly optimizing compilers, router protocols, Linux porting, and the occasional game. Jon holds degrees in Computer Science from Purdue University. In his spare time, he is a home winemaker.

Matthew McCullough, Vice President of Training for, is an energetic 15-year veteran of enterprise software development, world-traveling open source educator, and co-founder of a US consultancy. All these activities provide him avenues of sharing success stories of leveraging Git and GitHub. Matthew is a contributing author to the Gradle and Jenkins O'Reilly books, as well as the creator of the Git Master Class series for O'Reilly. Matthew also regularly speaks on the No Fluff Just Stuff Java symposium series. He is the author of the DZone Git RefCard, and president of the Denver Open Source Users Group.

Read More Show Less

Table of Contents

Assumed Framework;
Book Layout and Omissions;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Chapter 1: Introduction;
1.1 Background;
1.2 The Birth of Git;
1.3 Precedents;
1.4 Timeline;
1.5 What’s in a Name?;
Chapter 2: Installing Git;
2.1 Using Linux Binary Distributions;
2.2 Obtaining a Source Release;
2.3 Building and Installing;
2.4 Installing Git on Windows;
Chapter 3: Getting Started;
3.1 The Git Command Line;
3.2 Quick Introduction to Using Git;
3.3 Configuration Files;
3.4 Inquiry;
Chapter 4: Basic Git Concepts;
4.1 Basic Concepts;
4.2 Object Store Pictures;
4.3 Git Concepts at Work;
Chapter 5: File Management and the Index;
5.1 It’s All About the Index;
5.2 File Classifications in Git;
5.3 Using git add;
5.4 Some Notes on Using git commit;
5.5 Using git rm;
5.6 Using git mv;
5.7 A Note on Tracking Renames;
5.8 The .gitignore File;
5.9 A Detailed View of Git’s Object Model and Files;
Chapter 6: Commits;
6.1 Atomic Changesets;
6.2 Identifying Commits;
6.3 Commit History;
6.4 Finding Commits;
Chapter 7: Branches;
7.1 Reasons for Using Branches;
7.2 Branch Names;
7.3 Using Branches;
7.4 Creating Branches;
7.5 Listing Branch Names;
7.6 Viewing Branches;
7.7 Checking out Branches;
7.8 Deleting Branches;
Chapter 8: Diffs;
8.1 Forms of the git diff Command;
8.2 Simple git diff Example;
8.3 git diff and Commit Ranges;
8.4 git diff with Path Limiting;
8.5 Comparing How Subversion and Git Derive diffs;
Chapter 9: Merges;
9.1 Merge Examples;
9.2 Working with Merge Conflicts;
9.3 Merge Strategies;
9.4 How Git Thinks About Merges;
Chapter 10: Altering Commits;
10.1 Caution About Altering History;
10.2 Using git reset;
10.3 Using git cherry-pick;
10.4 Using git revert;
10.5 reset, revert, and checkout;
10.6 Changing the Top Commit;
10.7 Rebasing Commits;
Chapter 11: The Stash and the Reflog;
11.1 The Stash;
11.2 The Reflog;
Chapter 12: Remote Repositories;
12.1 Repository Concepts;
12.2 Referencing Other Repositories;
12.3 Example Using Remote Repositories;
12.4 Remote Repository Development Cycle in Pictures;
12.5 Remote Configuration;
12.6 Working with Tracking Branches;
12.7 Adding and Deleting Remote Branches;
12.8 Bare Repositories and git push;
Chapter 13: Repository Management;
13.1 A Word About Servers;
13.2 Publishing Repositories;
13.3 Repository Publishing Advice;
13.4 Repository Structure;
13.5 Living with Distributed Development;
13.6 Knowing Your Place;
13.7 Working with Multiple Repositories;
Chapter 14: Patches;
14.1 Why Use Patches?;
14.2 Generating Patches;
14.3 Mailing Patches;
14.4 Applying Patches;
14.5 Bad Patches;
14.6 Patching Versus Merging;
Chapter 15: Hooks;
15.1 Installing Hooks;
15.2 Available Hooks;
Chapter 16: Combining Projects;
16.1 The Old Solution: Partial Checkouts;
16.2 The Obvious Solution: Import the Code into Your Project;
16.3 The Automated Solution: Checking out Subprojects Using Custom Scripts;
16.4 The Native Solution: gitlinks and git submodule;
Chapter 17: Submodule Best Practices;
17.1 Submodule Commands;
17.2 Why Submodules?;
17.3 Submodules Preparation;
17.4 Why Read Only?;
17.5 Why Not Read Only?;
17.6 Examining the Hashes of Submodule Commits;
17.7 Credential Reuse;
17.8 Use Cases;
17.9 Multilevel Nesting of Repos;
17.10 Submodules on the Horizon;
Chapter 18: Using Git with Subversion Repositories;
18.1 Example: A Shallow Clone of a Single Branch;
18.2 Pushing, Pulling, Branching, and Merging with git svn;
18.3 Miscellaneous Notes on Working with Subversion;
Chapter 19: Advanced Manipulations;
19.1 Using git filter-branch;
19.2 How I Learned to Love git rev-list;
19.3 Interactive Hunk Staging;
19.4 Recovering a Lost Commit;
Chapter 20: Tips, Tricks, and Techniques;
20.1 Interactive Rebase with a Dirty Working Directory;
20.2 Remove Left-Over Editor Files;
20.3 Garbage Collection;
20.4 Split a Repository;
20.5 Tips for Recovering Commits;
20.6 Subversion Conversion Tips;
20.7 Manipulating Branches from Two Repositories;
20.8 Recovering from an Upstream Rebase;
20.9 Make Your Own Git Command;
20.10 Quick Overview of Changes;
20.11 Cleaning Up;
20.12 Using git-grep to Search a Repository;
20.13 Updating and Deleting refs;
20.14 Following Files that Moved;
20.15 Keep, But Don’t Track, This File;
20.16 Have You Been Here Before?;
Chapter 21: Git and GitHub;
21.1 Repo for Public Code;
21.2 Creating a GitHub Repository;
21.3 Social Coding on Open Source;
21.4 Watchers;
21.5 News Feed;
21.6 Forks;
21.7 Creating Pull Requests;
21.8 Managing Pull Requests;
21.9 Notifications;
21.10 Finding Users, Projects, and Code;
21.11 Wikis;
21.12 GitHub Pages (Git for Websites);
21.13 In-Page Code Editor;
21.14 Subversion Bridge;
21.15 Tags Automatically Becoming Archives;
21.16 Organizations;
21.17 REST API;
21.18 Social Coding on Closed Source;
21.19 Eventual Open Sourcing;
21.20 Coding Models;
21.21 GitHub Enterprise;
21.22 GitHub in Sum;

Read More Show Less

Customer Reviews

Average Rating 4
( 8 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 8 Customer Reviews
  • Posted September 18, 2012

    Great Git book! Already having a background in advanced usage of

    Great Git book!
    Already having a background in advanced usage of ClearCase, CVS, and SVN, I picked up Version Control with Git by Jon Loeliger and Matthew McCullough (O'Reilly publisher) to understand how Git could help me solve some of the feature challenges I have been working through with other VCSs. This book certainly was able to deliver to my expectations.
    The authors work through the processes to setup and configure Git step-by-step. In addition, they also spends a great deal of time delving into the more important topics required to work with Git as a power user. The examples were useful and the diagrams where acceptable to convey the points needed. There is no doubt that that the authors understand Git. The time they take in explaining why to “do something” is important in moving the reader from a simple user of Git into becoming a power user. The “Submodule Best Practices” chapter was helpful in solving some of my current challenges while the “Tips, Tricks, and Techniques” chapter gave me some quick wins.
    While there are many ways to solve the same problem when using any VCS, I felt like the authors worked hard to provide an honest and open view of their approaches. I highly recommend Version Control with Git to the reader that wants to understand more about a VCS like Git than simply a small number of quick commands via an IDE. While this book is not a definitive reference guide in all things Git, it provides a solid foundation that allows the reader to head in the right path as they learn more about Git’s inner workings.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 14, 2012

    Great book on Git

    Very nice progression and good examples.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 9, 2011

    I have one

    I have one. Great!

    0 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Posted March 22, 2010

    Clearly written, good working examples and use cases.

    This book was well written and reasonable to follow. The examples all worked for me and I was able to achieve my goal of using GIT to version control my software. I was able to create a remote repositiory on a usb stick and clone this repositiory to multiple development pcs. Changes made to the source by each pc were able to be synchronized with the main repository. There is an example of exactly how to do this in the book. I am an experienced IBM Rational Clearcase user, so I already understood the concepts involved. There is a pretty good use case example of multiple developers working on multiple branches, which illustrates concurrent development in a reasonable way. It took me a while to understand this stuff when I first learned Clearcase. A book like this would have been useful. I recommend this book.

    Was this review helpful? Yes  No   Report this review
  • Posted August 20, 2009

    GIT ME!!

    Do you want to gain insight into some of Git's internal design and be able to master some of its more powerful techniques? If you do, then this book is for you! Author Jon Loeliger, has done an outstanding job of writing a book that shows you how you can learn enough about basic Git operations to be productive in a short while.

    Loeliger, begins by showing you how to install Git on Linux and Microsoft Windows and within Cygwin. Next, the author explores why and where Git differs by examining the key components of its architecture and some important concepts. Then, he explains how to manage the index and your corpus of files. The author continues by showing you how to select, create, view, and remove branches. Next, he covers some of the basics of git diff and some of its special capabilities. Then, he shows you how to combine two or more different lines of development. The author continues by showing you examples and techniques to share, track, and obtain data across multiple repositories. Next, he presents two approaches to managing and publishing repositories for cooperative development. Then, the author explains when you might want to use patches and shows you how to generate, send, and apply a patch. He continues by discussing why developers create submodules and how Git attempts to deal with them. Finally, the author shows you how to use Git when the rest of your team employs a Subversion.

    This most excellent book shows you why Git is a powerful, flexible, and low-overhead version control tool that makes collaborative development a pleasure. More importantly, if you read this book cover to cover, you'll discover why Git has proven valuable to a wide range of projects.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 17, 2012

    No text was provided for this review.

  • Anonymous

    Posted February 18, 2013

    No text was provided for this review.

  • Anonymous

    Posted April 21, 2011

    No text was provided for this review.

Sort by: Showing all of 8 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)