Book description
A series of practical recipes to simplify the Git learning experience and increase your productivity when using Git version control
Key Features
- Explore practical recipes to use Git's most advanced features
- Learn how Git references its objects and how history is recorded
- Use reflog and git fsck to recover lost information
Book Description
Git is one of the most popular tools for versioning. Git Version Control Cookbook builds on the success of the previous edition and provides you with an up-to-date guide to solving problems related to versioning.
You'll start by learning about the Git data model and how it stores files and looks at commits. By using simple commands, you'll learn how to navigate through the database. Once you have accustomed yourself to the basics, you'll explore techniques to configure Git with comprehensive examples and configuration targets. You'll gain insights into improving your understanding of branches and recovery from mistakes — right from committing to a wrong branch to recovering lost commits or files. You'll then move on to discovering the features that Git rebase has to offer and use regular Git merge on other branches. You'll explore Git notes and learn how to utilize the update, list, and search commands. In addition to this, you'll learn how to extract metadata from repositories and automate your daily tasks using Git hooks. You'll then study in detail repository maintenance, patching, and offline sharing. By the end of the book, you'll have grasped various tips and tricks for everyday usage, while increasing your knowledge of Git providers, integrations, and clients.
What you will learn
- Understand the Git data model and use commands to navigate the database
- Find out how you can recover lost commits or files
- Force a rebase on some branches and use regular Git to merge on the rest
- Master the techniques required to extract metadata from repositories
- Explore Git notes and learn about the various features that it offers
- See how to decode different subcommands
Who this book is for
The Git Version Control Cookbook is for you if you are a developer or Build Release manager looking for a full-fledged practical guide that will take your Git knowledge to the next level. Basic knowledge of GNU tools and shell or bash scripting is needed.
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
- Navigating Git
- Configuration
- Branching, Merging, and Options
- Rebasing Regularly and Interactively, and Other Use Cases
- Storing Additional Information in Your Repository
- Extracting Data from the Repository
- Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts
-
Recovering from Mistakes
- Introduction
- Undo – Remove a commit completely
- Undo – Remove a commit and retain changes to files
- Undo – Remove a commit and retain changes in the staging area
- Undo – Working with a dirty area
- Redo – Recreate the latest commit with new changes
- Revert – Undo the changes introduced by a commit
- Reverting a merge
- Viewing past Git actions with git reflog
- Finding lost changes with git fsck
-
Repository Maintenance
- Introduction
- Pruning remote branches
- Running garbage collection manually
- Turning off automatic garbage collection
- Splitting a repository
- Rewriting history – changing a single file
- Creating a backup of your repositories as mirror repositories
- A quick "how-to" submodule
- Subtree merging
- Submodule versus subtree merging
- Patching and Offline Sharing
- Tips and Tricks
- Git Providers, Integrations, and Clients
- Other Books You May Enjoy
Product information
- Title: Git Version Control Cookbook
- Author(s):
- Release date: July 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789137545
You might also like
book
Git: Mastering Version Control
Learn everything you need to take full control of your workflow with Git with this curated …
book
Version Control with Git, 2nd Edition
Get up to speed on Git for tracking, branching, merging, and managing code revisions. Through a …
book
Git Essentials - Second Edition
Dive and explore into the latest addons of the latest Git. About This Book Master all …
book
Pragmatic Guide to Git
Need to learn how to wrap your head around Git, but don't need a lot of …