SitePoint
Blog
Forum
Library
Login
Join Premium
Toggle sidebar
Professional Git
Toggle community discussions
Close
Content
Bookmarks
Preface
PROFESSIONAL Git ®
About the Author
About the Technical Editor
About the Technical Proofreader
Credits
Acknowledgments
Introduction
HOW THIS BOOK IS UNIQUE
TARGET AUDIENCE
STRUCTURE AND CONTENT
READER VALUE
NEXT STEPS
1
What Is Git?
WHAT'S IN THIS CHAPTER?
HISTORY OF GIT
INDUSTRY-STANDARD TOOLING
THE GIT ECOSYSTEM
CHOOSING AN INTERFACE
GIT'S ADVANTAGES AND CHALLENGES
WORKING IN MULTIPLE BRANCHES SIMULTANEOUSLY WITH GIT
SUMMARY
Key Concepts
DESIGN CONCEPTS: USER-FACING
DESIGN CONCEPTS: INTERNAL
REPOSITORY DESIGN CONSIDERATIONS
SUMMARY
The Git Promotion Model
THE LEVELS OF GIT
SUMMARY
Connected Lab 1
Installing Git
Installing Git for Windows
Steps
Installing Git on Mac OS X
Installing Git on Linux
Configuration and Setup
EXECUTING COMMANDS IN GIT
CONFIGURING GIT
INITIALIZING A REPOSITORY
ADVANCED TOPICS
SUMMARY
Getting Productive
Getting Help
The Multiple Repositories Model
Adding Content to Track—Add
Finalizing Changes—Commit
Putting It All Together
Advanced Topics
Summary
Connected Lab 2
Creating and Exploring a Git Repository and Managing Content
Prerequisites
Optional Advanced Deep-Dive into the Repository Structure
Steps
Tracking Changes
GIT STATUS
Git Diff
SUMMARY
Connected Lab 3
Tracking Content through the File Status Life Cycle
Prerequisites
Steps
Working with Changes over Time and Using Tags
THE LOG COMMAND
GIT BLAME
SEEING HISTORY VISUALLY
Tags
UNDOING CHANGES IN HISTORY
ADVANCED TOPICS
SUMMARY
Connected Lab 4
Using Git History, Aliases, and Tags
Prerequisites
Steps
Working with Local Branches
WHAT IS A BRANCH?
ADVANCED TOPICS
SUMMARY
Connected Lab 5
Working with Branches
PREREQUISITES
STEPS
Merging Content
THE BASICS OF MERGING
DEALING WITH CONFLICTS
VISUAL MERGING
ADVANCED TOPICS
SUMMARY
Practicing with Merging
PREREQUISITES
STEPS
Supporting Files in Git
THE GIT ATTRIBUTES FILE
THE GIT IGNORE FILE
SUMMARY
Doing More with Git
MODIFYING THE LAYOUT OF FILES AND DIRECTORIES IN YOUR LOCAL ENVIRONMENT
COMMANDS FOR SEARCHING
WORKING WITH PATCHES AND ARCHIVES FOR CHANGES
COMMANDS FOR CLEANING UP
ADVANCED TOPICS
SUMMARY
Connected Lab 7
Deleting, Renaming, and Stashing
PREREQUISITES
STEPS
Understanding Remotes—Branches and Operations
REMOTES
SUMMARY
Connected Lab 8
Setting Up a GitHub Account and Cloning a Repository
Prerequisites
Steps
Understanding Remotes—Workflows for Changes
THE BASIC CONFLICT AND MERGE RESOLUTION WORKFLOW IN GIT
HOSTED REPOSITORIES
SUMMARY
Connected Lab 9
Using the Overall Workflow with a Remote Repository
PREREQUISITES
STEPS
Working with Trees and Modules in Git
WORKTREES
SUBMODULES
SUBTREES
SUMMARY
ABOUT CONNECTED LABS 10–12
Connected Lab 10
Working with Worktrees
PREREQUISITES
STEPS
Connected Lab 11
Working with Submodules
PREREQUISITES
STEPS
Connected Lab 12
Working with Subtrees
PREREQUISITES
STEPS
Extending Git Functionality with Git Hooks
INSTALLING HOOKS
UPDATING HOOKS
COMMON HOOK ATTRIBUTES
HOOK DESCRIPTIONS
OTHER HOOKS
HOOKS QUICK REFERENCE
SUMMARY
WILEY END USER LICENSE AGREEMENT
Open text modal
Community Questions
Close