Git Pocket Guide


This pocket guide is the perfect on-the-job companion to Git, the distributed version control system. It provides a compact, readable introduction to Git for new users, as well as a reference to common commands and procedures for those of you with Git experience.

Written for Git version 1.8.2, this handy task-oriented guide is organized around the basic version control functions you need, such as making ...

See more details below
$12.14 price
(Save 19%)$14.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (12) from $6.77   
  • New (11) from $6.77   
  • Used (1) from $12.13   
Git Pocket Guide

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)
$10.49 price
(Save 12%)$11.99 List Price


This pocket guide is the perfect on-the-job companion to Git, the distributed version control system. It provides a compact, readable introduction to Git for new users, as well as a reference to common commands and procedures for those of you with Git experience.

Written for Git version 1.8.2, this handy task-oriented guide is organized around the basic version control functions you need, such as making commits, fixing mistakes, merging, and searching history.

  • Examine the state of your project at earlier points in time
  • Learn the basics of creating and making changes to a repository
  • Create branches so many people can work on a project simultaneously
  • Merge branches and reconcile the changes among them
  • Clone an existing repository and share changes with push/pull commands
  • Examine and change your repository’s commit history
  • Access remote repositories, using different network protocols
  • Get recipes for accomplishing a variety of common tasks
Read More Show Less

Product Details

  • ISBN-13: 9781449325862
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 7/30/2013
  • Edition number: 1
  • Pages: 234
  • Sales rank: 197,615
  • Product dimensions: 4.30 (w) x 6.90 (h) x 0.60 (d)

Meet the Author

Richard E. Silverman has a B.A. in computer science and an M.A. in pure mathematics. Richard has worked in the fields of networking, formal methods in software development, public-key infrastructure, routing security, and Unix systems administration. He co-authored the SSH, The Secure Shell: The Definitive Guide, 2e and the Linux Security Cookbook.

Read More Show Less

Table of Contents

What Is Git?;
Goals of This Book;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Chapter 1: Understanding Git;
1.1 Overview;
1.2 The Object Store;
1.3 Object IDs and SHA-1;
1.4 Where Objects Live;
1.5 The Commit Graph;
1.6 Refs;
1.7 Branches;
1.8 The Index;
1.9 Merging;
1.10 Push and Pull;
Chapter 2: Getting Started;
2.1 Basic Configuration;
2.2 Creating a New, Empty Repository;
2.3 Importing an Existing Project;
2.4 Ignoring Files;
Chapter 3: Making Commits;
3.1 Changing the Index;
3.2 Making a Commit;
Chapter 4: Undoing and Editing Commits;
4.1 Changing the Last Commit;
4.2 Discarding the Last Commit;
4.3 Undoing a Commit;
4.4 Editing a Series of Commits;
Chapter 5: Branching;
5.1 The Default Branch, master;
5.2 Making a New Branch;
5.3 Switching Branches;
5.4 Deleting a Branch;
5.5 Renaming a Branch;
Chapter 6: Tracking Other Repositories;
6.1 Cloning a Repository;
6.2 Local, Remote, and Tracking Branches;
6.3 Synchronization: Push and Pull;
6.4 Access Control;
Chapter 7: Merging;
7.1 Merge Conflicts;
7.2 Details on Merging;
7.3 Merge Tools;
7.4 Custom Merge Tools;
7.5 Merge Strategies;
7.6 Why the Octopus?;
7.7 Reusing Previous Merge Decisions;
Chapter 8: Naming Commits;
8.1 Naming Individual Commits;
8.2 Naming Sets of Commits;
Chapter 9: Viewing History;
9.1 Command Format;
9.2 Output Formats;
9.3 Defining Your Own Formats;
9.4 Limiting Commits to Be Shown;
9.5 Regular Expressions;
9.6 Reflog;
9.7 Decoration;
9.8 Date Style;
9.9 Listing Changed Files;
9.10 Showing and Following Renames or Copies;
9.11 Rewriting Names and Addresses: The “mailmap”;
9.12 Searching for Changes: The “pickaxe”;
9.13 Showing Diffs;
9.14 Comparing Branches;
9.15 Showing Notes;
9.16 Commit Ordering;
9.17 History Simplification;
9.18 Related Commands;
Chapter 10: Editing History;
10.1 Rebasing;
10.2 Importing from One Repository to Another;
10.3 Commit Surgery: git replace;
10.4 The Big Hammer: git filter-branch;
10.5 Notes;
Chapter 11: Understanding Patches;
11.1 Applying Plain Diffs;
11.2 Patches with Commit Information;
Chapter 12: Remote Access;
12.1 SSH;
12.2 HTTP;
12.3 Storing Your Username;
12.4 Storing Your Password;
12.5 References;
Chapter 13: Miscellaneous;
13.1 git cherry-pick;
13.2 git notes;
13.3 git grep;
13.4 git rev-parse;
13.5 git clean;
13.6 git stash;
13.7 git show;
13.8 git tag;
13.9 git diff;
13.10 git instaweb;
13.11 Git Hooks;
13.12 Visual Tools;
13.13 Submodules;
Chapter 14: How Do I…?;
14.1 …Make and Use a Central Repository?;
14.2 …Fix the Last Commit I Made?;
14.3 …Edit the Previous n Commits?;
14.4 …Undo My Last n Commits?;
14.5 …Reuse the Message from an Existing Commit?;
14.6 …Reapply an Existing Commit from Another Branch?;
14.7 …List Files with Conflicts when Merging?;
14.8 …Get a Summary of My Branches?;
14.9 …Get a Summary of My Working Tree and Index State?;
14.10 …Stage All the Current Changes to My Working Files?;
14.11 …Show the Changes to My Working Files?;
14.12 …Save and Restore My Working Tree and Index Changes?;
14.13 …Add a Downstream Branch Without Checking It Out?;
14.14 …List the Files in a Specific Commit?;
14.15 …Show the Changes Made by a Commit?;
14.16 …Get Tab Completion of Branch Names, Tags, and So On?;
14.17 …List All Remotes?;
14.18 …Change the URL for a Remote?;
14.19 …Remove Old Remote-Tracking Branches?;
14.20 …Have git log:;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
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

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