Professional Git

Book description

Leverage the power of Git to smooth out the development cycle

Professional Git takes a professional approach to learning this massively popular software development tool, and provides an up-to-date guide for new users. More than just a development manual, this book helps you get into the Git mindset—extensive discussion of corollaries to traditional systems as well as considerations unique to Git help you draw upon existing skills while looking out—and planning for—the differences. Connected labs and exercises are interspersed at key points to reinforce important concepts and deepen your understanding, and a focus on the practical goes beyond technical tutorials to help you integrate the Git model into your real-world workflow.

Git greatly simplifies the software development cycle, enabling users to create, use, and switch between versions as easily as you switch between files. This book shows you how to harness that power and flexibility to streamline your development cycle.

  • Understand the basic Git model and overall workflow
  • Learn the Git versions of common source management concepts and commands
  • Track changes, work with branches, and take advantage of Git's full functionality
  • Avoid trip-ups and missteps common to new users

Git works with the most popular software development tools and is used by almost all of the major technology companies. More than 40 percent of software developers use it as their primary source control tool, and that number continues to grow; the ability to work effectively with Git is rapidly approaching must-have status, and Professional Git is the comprehensive guide you need to get up to speed quickly.

Table of contents

  1. Cover
  2. Title Page
  3. Introduction
    1. How this Book is Unique
    2. Target Audience
    3. Structure and Content
    4. Reader Value
    5. Next Steps
  4. PART I: UNDERSTANDING GIT CONCEPTS
    1. Chapter 1: What Is Git?
      1. History of Git
      2. Industry-Standard Tooling
      3. The Git Ecosystem
      4. Git's Advantages and Challenges
      5. Summary
    2. Chapter 2: Key Concepts
      1. Design Concepts: User-Facing
      2. Design Concepts: Internal
      3. Repository Design Considerations
      4. Summary
    3. Chapter 3: The Git Promotion Model
      1. The Levels of Git
      2. Summary
    4. Connected Lab 1: Installing Git
      1. Installing Git for Windows
      2. Steps
      3. Installing Git on Mac OS X
      4. Installing Git on Linux
  5. PART II: USING GIT
    1. Chapter 4: Configuration and Setup
      1. Executing Commands in Git
      2. Configuring Git
      3. Initializing a Repository
      4. Advanced Topics
      5. Summary
    2. Chapter 5: Getting Productive
      1. Getting Help
      2. The Multiple Repositories Model
      3. Adding Content to Track—Add
      4. Finalizing Changes—Commit
      5. Putting It All Together
      6. Advanced Topics
      7. Summary
    3. Connected Lab 2: Creating and Exploring a Git Repository and Managing Content
      1. Prerequisites
      2. Optional Advanced Deep-Dive into the Repository Structure
      3. Steps
    4. Chapter 6: Tracking Changes
      1. Git Status
      2. Git Diff
      3. Summary
    5. Connected Lab 3: Tracking Content through the File Status Life Cycle
      1. Prerequisites
      2. Steps
    6. Chapter 7: Working with Changes over Time and Using Tags
      1. The Log Command
      2. Git Blame
      3. Seeing History Visually
      4. Tags
      5. Undoing Changes in History
      6. Advanced Topics
      7. Summary
    7. Connected Lab 4: Using Git History, Aliases, and Tags
      1. Prerequisites
      2. Steps
    8. Chapter 8: Working with Local Branches
      1. What Is a Branch?
      2. Advanced Topics
      3. Summary
    9. Connected Lab 5: Working with Branches
      1. Prerequisites
      2. Steps
    10. Chapter 9: Merging Content
      1. The Basics of Merging
      2. Dealing with Conflicts
      3. Visual Merging
      4. Advanced Topics
      5. Summary
    11. Connected Lab 6: Practicing with Merging
      1. Prerequisites
      2. Steps
    12. Chapter 10: Supporting Files in Git
      1. The Git Attributes File
      2. The Git Ignore File
      3. Summary
    13. Chapter 11: Doing More with Git
      1. Modifying the Layout of Files and Directories in Your Local Environment
      2. Commands for Searching
      3. Working with Patches and Archives for Changes
      4. Commands for Cleaning Up
      5. Advanced Topics
      6. Summary
    14. Connected Lab 7: Deleting, Renaming, and Stashing
      1. Prerequisites
      2. Steps
    15. Chapter 12: Understanding Remotes—Branches and Operations
      1. Remotes
      2. Summary
    16. Connected Lab 8: Setting Up a GitHub Account and Cloning a Repository
      1. Prerequisites
      2. Steps
    17. Chapter 13: Understanding Remotes—Workflows for Changes
      1. The Basic Conflict and Merge Resolution Workflow in Git
      2. Hosted Repositories
      3. Summary
    18. Connected Lab 9: Using the Overall Workflow with a Remote Repository
      1. Prerequisites
      2. Steps
    19. Chapter 14: Working with Trees and Modules in Git
      1. Worktrees
      2. Submodules
      3. Subtrees
      4. Summary
      5. About Connected Labs 10–12
    20. Connected Lab 10: Working with Worktrees
      1. Prerequisites
      2. Steps
    21. Connected Lab 11: Working with Submodules
      1. Prerequisites
      2. Steps
    22. Connected Lab 12: Working with Subtrees
      1. Prerequisites
      2. Steps
    23. Chapter 15: Extending Git Functionality with Git Hooks
      1. Installing Hooks
      2. Updating Hooks
      3. Common Hook Attributes
      4. Hook Descriptions
      5. Other Hooks
      6. Hooks Quick Reference
      7. Summary
  6. End User License Agreement

Product information

  • Title: Professional Git
  • Author(s): Brent Laster
  • Release date: December 2016
  • Publisher(s): Wrox
  • ISBN: 9781119284970