Home Page Icon
Home Page
Table of Contents for
Title
Close
Title
by Ben Straub, Scott Chacon
Pro Git, Second Edition
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Authors
Preface by Scott Chacon
Preface by Ben Straub
Chapter 1: Getting Started
About Version Control
Local Version Control Systems
Centralized Version Control Systems
Distributed Version Control Systems
A Short History of Git
Git Basics
Snapshots, Not Differences
Nearly Every Operation Is Local
Git Has Integrity
Git Generally Only Adds Data
The Three States
The Command Line
Installing Git
Installing on Linux
Installing on Mac
Installing on Windows
First-Time Git Setup
Your Identity
Your Editor
Checking Your Settings
Getting Help
Summary
Chapter 2: Git Basics
Getting a Git Repository
Initializing a Repository in an Existing Directory
Cloning an Existing Repository
Recording Changes to the Repository
Checking the Status of Your Files
Tracking New Files
Staging Modified Files
Short Status
Ignoring Files
Viewing Your Staged and Unstaged Changes
Committing Your Changes
Skipping the Staging Area
Removing Files
Moving Files
Viewing the Commit History
Limiting Log Output
Undoing Things
Unstaging a Staged File
Unmodifying a Modified File
Working with Remotes
Showing Your Remotes
Adding Remote Repositories
Fetching and Pulling from Your Remotes
Pushing to Your Remotes
Inspecting a Remote
Removing and Renaming Remotes
Tagging
Listing Your Tags
Creating Tags
Annotated Tags
Lightweight Tags
Tagging Later
Sharing Tags
Git Aliases
Summary
Chapter 3: Git Branching
Branching in a Nutshell
Creating a New Branch
Switching Branches
Basic Branching and Merging
Basic Branching
Basic Merging
Basic Merge Conflicts
Branch Management
Branching Workflows
Long-Running Branches
Topic Branches
Remote Branches
Pushing
Tracking Branches
Pulling
Deleting Remote Branches
Rebasing
The Basic Rebase
More Interesting Rebases
The Perils of Rebasing
Rebase When You Rebase
Rebase vs. Merge
Summary
Chapter 4: Git on the Server
The Protocols
Local Protocol
The HTTP Protocols
The Git Protocol
Getting Git on a Server
Putting the Bare Repository on a Server
Small Setups
Generating Your SSH Public Key
Setting Up the Server
Git Daemon
Smart HTTP
GitWeb
GitLab
Installation
Administration
Users
Groups
Projects
Hooks
Basic Usage
Working Together
Third Party Hosted Options
Summary
Chapter 5: Distributed Git
Distributed Workflows
Centralized Workflow
Integration-Manager Workflow
Dictator and Lieutenants Workflow
Workf lows Summary
Contributing to a Project
Commit Guidelines
Private Small Team
Private Managed Team
Public Project, Fork
Public Project, E-Mail
Summary
Maintaining a Project
Working in Topic Branches
Applying Patches from E-mail
Determining What Is Introduced
Integrating Contributed Work
Large-Merging Workflows
Rebasing and Cherry Picking Workflows
Rerere
Tagging Your Releases
Generating a Build Number
Preparing a Release
The Shortlog
Summary
Chapter 6: Github
Account Setup and Configuration
SSH Access
Your Avatar
Your Email Addresses
Two-Factor Authentication
Contributing to a Project
Forking Projects
The GitHub Flow
Creating a Pull Request
Iterating on a Pull Request
Advanced Pull Requests
Markdown
GitHub Flavored Markdown
Maintaining a Project
Creating a New Repository
Adding Collaborators
Managing Pull Requests
Mentions and Notifications
Special Files
Project Administration
Managing an Organization
Organization Basics
Teams
Audit Log
Scripting GitHub
Hooks
The GitHub API
Octokit
Summary
Chapter 7: Git Tools
Revision Selection
Single Revisions
Short SHA
Branch References
Ref?Log Shortnames
Ancestry References
Commit Ranges
Interactive Staging
Staging and Unstaging Files
Staging Patches
Stashing and Cleaning
Stashing Your Work
Creative Stashing
Unapplying a Stash
Creating a Branch from a Stash
Cleaning Your Working Directory
Signing Your Work
GPG Introduction
Signing Tags
Verifying Tags
Signing Commits
Everyone Must Sign
Searching
Git Grep
Git Log Searching
Line Log Search
Rewriting History
Changing the Last Commit
Changing Multiple Commit Messages
Reordering Commits
Squashing a Commit
Splitting a Commit
The Nuclear Option: filter-branch
Reset Demystified
The Three Trees
The Workflow
The Role of Reset
Reset with a Path
Squashing
Check It Out
Summary
Advanced Merging
Merge Conflicts
Aborting a Merge
Ignoring Whitespace
Manual File Re-merging
Checking Out Conflicts
Merge Log
Combined Diff Format
Undoing Merges
Other Types of Merges
Rerere
Debugging with Git
File Annotation
Binary Search
Submodules
Starting with Submodules
Cloning a Project with Submodules
Working on a Project with Submodules
Publishing Submodule Changes
Merging Submodule Changes
Submodule Tips
Bundling
Replace
Credential Storage
Under the Hood
A Custom Credential Cache
Summary
Chapter 8: Customizing Git
Git Configuration
Basic Client Configuration
Colors in Git
External Merge and Diff Tools
Formatting and Whitespace
Server Configuration
Git Attributes
Binary Files
Keyword Expansion
Exporting Your Repository
Merge Strategies
Git Hooks
Installing a Hook
Client-Side Hooks
Committing-Workflow Hooks
E-mail Workflow Hooks
Other Client Hooks
Server-Side Hooks
An Example Git-Enforced Policy
Server-Side Hook
Enforcing a Specific Commit-Message Format
Enforcing a User-Based ACL System
Testing It Out
Client-Side Hooks
Summary
Chapter 9: Git and Other Systems
Git as a Client
Git and Subversion
Git and Mercurial
Git and Perforce
Git and TFS
Migrating to Git
Subversion
Mercurial
Perforce
A Custom Importer
Summary
Chapter 10: Git Internals
Plumbing and Porcelain
Git Objects
Tree Objects
Commit Objects
Object Storage
Git References
The HEAD
Tags
Remotes
Packfiles
The Refspec
Pushing Refspecs
Deleting References
Transfer Protocols
The Dumb Protocol
The Smart Protocol
Protocols Summary
Maintenance and Data Recovery
Maintenance
Data Recovery
Removing Objects
Environment Variables
Global Behavior
Repository Locations
Pathspecs
Committing
Networking
Diffing and Merging
Debugging
Miscellaneous
Summary
Appendix A: Git in Other Environments
Graphical Interfaces
gitk and git-gui
GitHub for Mac and Windows
Summary
Other GUIs
Git in Visual Studio
Git in Eclipse
Git in Bash
Git in Zsh
Git in Powershell
Summary
Appendix B: Embedded Git in Your Applications
Command-line Git
Libgit2
Advanced Functionality
Other Bindings
Further Reading
Appendix C: Git Commands
Setup and Config
git config
git help
Getting and Creating Projects
git init
git clone
Basic Snapshotting
git add
git status
git diff
git difftool
git commit
git reset
git rm
git mv
git clean
Branching and Merging
git branch
git checkout
git merge
git mergetool
git log
git stash
git tag
Sharing and Updating Projects
git fetch
git pull
git push
git remote
git archive
git submodule
Inspection and Comparison
git show
git shortlog
git describe
Debugging
git bisect
git blame
git grep
Patching
git cherry-pick
git rebase
git revert
Email
git apply
git am
git format-patch
git send-email
git request-pull
External Systems
git svn
git fast-import
Administration
git gc
git fsck
git reflog
git filter-branch
Plumbing Commands
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Copyright
Pro Git
Second Edition
Scott Chacon
Ben Straub
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset