售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Git Version Control Cookbook
Table of Contents
Git Version Control Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Navigating Git
Introduction
Git's objects
Getting ready
How to do it...
The commit object
The tree object
The blob object
The branch
The tag object
How it works...
There's more...
See also
The three stages
Getting ready
How to do it…
How it works…
See also
Viewing the DAG
Getting ready
How to do it...
How it works...
See also
Extracting fixed issues
Getting ready
How to do it...
How it works...
There's more...
Getting a list of the changed files
Getting ready
How to do it...
How it works...
There's more...
See also
Viewing history with Gitk
Getting ready
How to do it...
How it works...
There's more...
Finding commits in history
Getting ready
How to do it...
How it works...
There's more...
Searching through history code
Getting ready
How to do it...
How it works...
There's more...
2. Configuration
Configuration targets
Getting ready
How to do it...
How it works...
There's more...
Querying the existing configuration
Getting ready
How to do it...
How it works...
There's more...
Templates
Getting ready
How to do it...
How it works...
A .git directory template
Getting ready
How to do it...
How it works...
See also
A few configuration examples
Getting ready
How to do it...
Rebase and merge setup
Expiry of objects
Autocorrect
How it works...
There's more...
Git aliases
Getting ready
How to do it...
How it works...
There's more...
The refspec exemplified
Getting ready
How to do it...
How it works...
3. Branching, Merging, and Options
Introduction
Managing your local branches
Getting ready
How to do it…
How it works…
There's more...
Branches with remotes
Getting ready
How to do it…
There's more...
Forcing a merge commit
Getting ready
How to do it...
There's more…
Using git rerere to merge known conflicts
How to do it…
There's more...
The difference between branches
Getting ready
How to do it…
There's more…
4. Rebase Regularly and Interactively, and Other Use Cases
Introduction
Rebasing commits to another branch
Getting ready
How to do it…
How it works
Continuing a rebase with merge conflicts
How to do it
How it works
There's more…
Rebasing selective commits interactively
Getting ready
How to do it
There's more…
Squashing commits using an interactive rebase
Getting ready
How to do it...
There's more…
Changing the author of commits using a rebase
Getting ready
How to do it...
How it works...
Auto-squashing commits
Getting ready
How to do it...
There's more…
5. Storing Additional Information in Your Repository
Introduction
Adding your first Git note
Getting ready
How to do it…
There's more...
Separating notes by category
Getting ready
How to do it...
How it works...
Retrieving notes from the remote repository
Getting ready
How to do it...
How it works...
Pushing notes to a remote repository
How to do it...
There's more...
Tagging commits in the repository
Getting ready
How to do it...
There's more...
6. Extracting Data from the Repository
Introduction
Extracting the top contributor
Getting ready
How to do it...
There's more...
Finding bottlenecks in the source tree
Getting ready
How to do it...
There's more...
Grepping the commit messages
Getting ready
How to do it...
The contents of the releases
How to do it...
How it works...
7. Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts
Introduction
Using a branch description in the commit message
Getting ready
How to do it...
Creating a dynamic commit message template
Getting ready
How to do it...
There's more...
Using external information in the commit message
Getting ready
How to do it...
Preventing the push of specific commits
Getting ready
How to do it...
There's more...
Configuring and using Git aliases
How to do it...
How it works...
Configuring and using Git scripts
How to do it...
Setting up and using a commit template
Getting ready
How to do it...
8. Recovering from Mistakes
Introduction
Undo – remove a commit completely
Getting ready
How to do it...
How it works…
Undo – remove a commit and retain the changes to files
Getting ready
How to do it...
How it works…
Undo – remove a commit and retain the changes in the staging area
Getting ready
How to do it...
How it works…
Undo – working with a dirty area
Getting ready
How to do it...
How it works…
See also
Redo – recreate the latest commit with new changes
Getting ready
How to do it...
How it works...
There is more…
Revert – undo the changes introduced by a commit
Getting ready
How to do it...
How it works...
There's more...
Reverting a merge
Getting ready
How to do it...
How it works...
There is more...
See also
Viewing past Git actions with git reflog
Getting ready
How to do it...
How it works...
Finding lost changes with git fsck
Getting ready
How to do it...
How it works...
See also
9. Repository Maintenance
Introduction
Pruning remote branches
Getting ready
How to do it...
How it works…
There's more…
Running garbage collection manually
Getting ready
How to do it...
How it works…
Turning off automatic garbage collection
Getting ready
How to do it...
Splitting a repository
Getting ready
How to do it...
How it works…
There's more…
Rewriting history – changing a single file
Getting ready
How to do it...
How it works…
Back up your repositories as mirror repositories
Getting ready
How to do it...
How it works…
There's more…
A quick submodule how-to
Getting ready
How to do it...
There's more…
Subtree merging
Getting ready
How to do it...
How it works…
See also
Submodule versus subtree merging
10. Patching and Offline Sharing
Introduction
Creating patches
Getting ready
How to do it...
How it works…
There's more…
Creating patches from branches
Getting ready
How to do it...
How it works…
There's more…
Applying patches
Getting ready
How to do it...
How it works…
There's more…
Sending patches
Getting ready
How to do it...
How it works…
There's more…
Creating Git bundles
Getting ready
How to do it...
How it works…
Using a Git bundle
Getting ready
How to do it…
There's more…
Creating archives from a tree
Getting ready
How to do it...
There's more…
11. Git Plumbing and Attributes
Introduction
Displaying the repository information
Getting ready
How to do it...
There's more…
Displaying the tree information
Getting ready
How to do it...
Displaying the file information
Getting ready
How to do it...
There's more…
Writing a blob object to the database
Getting ready
How to do it...
How it works…
There's more…
Writing a tree object to the database
Getting ready
How to do it...
How it works…
Writing a commit object to the database
Getting ready
How to do it...
How it works…
Keyword expansion with attribute filters
Getting ready
How to do it...
How it works…
There's more…
Metadata diff of binary files
Getting ready
How to do it...
How it works…
There's more…
Storing binaries elsewhere
Getting ready
How to do it...
How it works…
There's more…
See also
Checking the attributes of a file
Getting ready
How to do it...
Attributes to export an archive
Getting ready
How to do it...
There's more…
12. Tips and Tricks
Introduction
Using git stash
Getting ready
How to do it...
How it works…
There's more…
Saving and applying stashes
Getting ready
How to do it...
There's more…
Debugging with git bisect
Getting ready
How to do it...
There's more…
Using the blame command
Getting ready
How to do it...
There's more…
Color UI in the prompt
Getting ready
How to do it...
There's more…
Autocompletion
Getting ready
Linux
Mac
Windows
How to do it...
How it works…
There's more…
Bash prompt with status information
Getting ready
How to do it...
How it works…
There's more…
See also
More aliases
Getting ready
How to do it...
Interactive add
Getting ready
How to do it...
There's more…
Interactive add with Git GUI
Getting ready
How to do it...
Ignoring files
Getting ready
How to do it...
There's more…
See also…
Showing and cleaning ignored files
Getting ready
How to do it...
There's more…
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜