Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Git Pocket Guide
Git Pocket Guide
Richard E. Silverman
Special Upgrade Offer
Preface
What Is Git?
Goals of This Book
Conventions Used in This Book
Unix
Shell
Command Syntax
Typography
Tip
Using Code Examples
Safari® Books Online
How to Contact Us
Acknowledgments
Chapter 1. Understanding Git
Overview
Terminology
Branches
Sharing Work
The Object Store
Blob
Tree
Note
Commit
Author versus Committer
Cryptographic Signature
Tag
Note
Object IDs and SHA-1
Security
Where Objects Live
The Commit Graph
Refs
Related Commands
Warning
Branches
The Index
Merging
Merging Content
Merging History
Push and Pull
Notes
Chapter 2. Getting Started
Basic Configuration
Personal Identification
Text Editor
Commit ID Abbreviation
Pagination
Color
Cryptographic Keys
Command Aliases
Getting Help
References
Creating a New, Empty Repository
Selected Options
The .git Directory
Importing an Existing Project
Ignoring Files
Syntax of “Ignore Patterns”
Note
Chapter 3. Making Commits
Changing the Index
git commit <filename>
Adding a New File
Adding the Changes to an Existing File
Adding Partial Changes
Shortcuts
Removing a File
Renaming a File
Unstaging Changes
Making a Commit
Commit Messages
What Makes a Good Commit?
Shortcuts
Empty Directories
A Commit Workflow
Chapter 4. Undoing and Editing Commits
Note
Changing the Last Commit
Fixing a Commit Message
Double Oops!
Discarding the Last Commit
Discarding Any Number of Commits
Undoing a Commit
Partial Undo
Editing a Series of Commits
Conflicts
Tip
The exec Action
Chapter 5. Branching
The Default Branch, master
Making a New Branch
Switching Branches
Uncommitted Changes
Check Out with Merge
Untracked Files
Losing Your Head
Deleting a Branch
When to delete a branch?
Renaming a Branch
Chapter 6. Tracking Other Repositories
Cloning a Repository
Clones and Hard Links
Note
Shared Clone
Bare Repositories
Reference Repositories
Warning
Local, Remote, and Tracking Branches
Synchronization: Push and Pull
Pulling
Pushing
Push Defaults
Pull with Rebase
Notes
Access Control
Chapter 7. Merging
Warning
Merge Conflicts
Tip
Tip
Resolving Merge Conflicts
Notes
Details on Merging
Merge Tools
Notes
Custom Merge Tools
Merge Strategies
Why the Octopus?
Reusing Previous Merge Decisions
Chapter 8. Naming Commits
Naming Individual Commits
Commit ID
Ref Name
Names Relative to a Given Commit
Names Relative to the Reflog
The Upstream Branch
Matching a Commit Message
Notes
Following Chains
Addressing Pathnames
Warning
Naming Sets of Commits
Warning
Chapter 9. Viewing History
Command Format
Output Formats
Defining Your Own Formats
Notes
Limiting Commits to Be Shown
Regular Expressions
Reflog
Decoration
Date Style
Listing Changed Files
Showing and Following Renames or Copies
Detecting Copies
Rewriting Names and Addresses: The “mailmap”
Shortening Names
Searching for Changes: The “pickaxe”
Showing Diffs
Color
Word Diff
Comparing Branches
Displaying Sides
Showing Notes
Commit Ordering
Warning
History Simplification
Related Commands
git cherry
git shortlog
Chapter 10. Editing History
Rebasing
Undoing a Rebase
Importing from One Repository to Another
Importing Disconnected History
Importing Linear History
Warning
Importing Nonlinear History
Commit Surgery: git replace
Keeping It Real
Note
Warning
The Big Hammer: git filter-branch
Examples
Expunging Files
Shifting to a Subdirectory
Updating Tags
Warning
Notes
Chapter 11. Understanding Patches
Applying Plain Diffs
Patches with Commit Information
Chapter 12. Remote Access
SSH
Warning
Note
HTTP
Storing Your Username
Storing Your Password
References
Chapter 13. Miscellaneous
git cherry-pick
git notes
git notes Subcommands
git grep
Combining Regular Expressions
Note
What to Search
What to Show
How to Match
git rev-parse
git clean
git stash
Subcommands
save
list
show
pop
apply
branch <branchname> [stash]
drop [stash]
clear
git show
git tag
Deleting a Tag from a Remote
Following Tags
Backdating Tags
git diff
git diff
git diff --staged
git diff <commit>
git diff <A> <B>
Options and Arguments
git instaweb
Git Hooks
Visual Tools
Submodules
Chapter 14. How Do I…?
…Make and Use a Central Repository?
…Fix the Last Commit I Made?
…Edit the Previous n Commits?
…Undo My Last n Commits?
…Reuse the Message from an Existing Commit?
…Reapply an Existing Commit from Another Branch?
…List Files with Conflicts when Merging?
…Get a Summary of My Branches?
…Get a Summary of My Working Tree and Index State?
…Stage All the Current Changes to My Working Files?
…Show the Changes to My Working Files?
…Save and Restore My Working Tree and Index Changes?
…Add a Downstream Branch Without Checking It Out?
…List the Files in a Specific Commit?
…Show the Changes Made by a Commit?
…Get Tab Completion of Branch Names, Tags, and So On?
…List All Remotes?
…Change the URL for a Remote?
…Remove Old Remote-Tracking Branches?
…Have git log:
Find Commits I Made but Lost?
Not Show the diffs for Root Commits?
Show the Changes for Each Commit?
Show the Committer as well as the Author?
Index
A note on the digital index
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
T
U
V
About the Author
Special Upgrade Offer
Git Pocket Guide
Richard E. Silverman
Editor
Mike Loukides
Editor
Meghan Blanchette
← Prev
Back
Next →
← Prev
Back
Next →