Synopses & Reviews
Version Control with Git takes you step-by-step through ways to track, merge, and manage software projects, using this highly flexible, open source version control system.
Git permits virtually an infinite variety of methods for development and collaboration. Created by Linus Torvalds to manage development of the Linux kernel, it's become the principal tool for distributed version control. But Git's flexibility also means that some users don't understand how to use it to their best advantage. Version Control with Git offers tutorials on the most effective ways to use it, as well as friendly yet rigorous advice to help you navigate Git's many functions.
With this book, you will:
- Learn how to use Git in several real-world development environments
- Gain insight into Git's common-use cases, initial tasks, and basic functions
- Understand how to use Git for both centralized and distributed version control
- Use Git to manage patches, diffs, merges, and conflicts
- Acquire advanced techniques such as rebasing, hooks, and ways to handle submodules (subprojects)
- Learn how to use Git with Subversion
Git has earned the respect of developers around the world. Find out how you can benefit from this amazing tool with Version Control with Git.
Offering step-by-step tutorials, this book takes readers through ways to track, merge, and manage software projects using Git, the flexible open source version control system.
About 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.
Table of Contents
Preface; Audience; Assumed Framework; Book Layout and Omissions; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Introduction; 1.1 Background; 1.2 The Birth of Git; 1.3 Precedents; 1.4 Time Line; 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: Remote Repositories; 11.1 Repository Concepts; 11.2 Referencing Other Repositories; 11.3 Example Using Remote Repositories; 11.4 Remote Repository Operations in Pictures; 11.5 Adding and Deleting Remote Branches; 11.6 Remote Configuration; 11.7 Bare Repositories and git push; 11.8 Publishing Repositories; Chapter 12: Repository Management; 12.1 Repository Structure; 12.2 Living with Distributed Development; 12.3 Knowing Your Place; 12.4 Working with Multiple Repositories; Chapter 13: Patches; 13.1 Why Use Patches?; 13.2 Generating Patches; 13.3 Mailing Patches; 13.4 Applying Patches; 13.5 Bad Patches; 13.6 Patching Versus Merging; Chapter 14: Hooks; 14.1 Installing Hooks; 14.2 Available Hooks; Chapter 15: Combining Projects; 15.1 The Old Solution: Partial Checkouts; 15.2 The Obvious Solution: Import the Code into Your Project; 15.3 The Automated Solution: Checking Out Subprojects Using Custom Scripts; 15.4 The Native Solution: gitlinks and git submodule; Chapter 16: Using Git with Subversion Repositories; 16.1 Example: A Shallow Clone of a Single Branch; 16.2 Pushing, Pulling, Branching, and Merging with git svn; 16.3 Miscellaneous Notes on Working with Subversion; Colophon;