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 Gits most advanced features Learn how Git references its objects and how history is recorded Use reflog and git fsck to recover lost information
Book DescriptionGit 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.
Youll start by learning about the Git data model and how it stores files and looks at commits. By using simple commands, youll learn how to navigate through the database. Once you have accustomed yourself to the basics, youll explore techniques to configure Git with comprehensive examples and configuration targets. Youll 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. Youll then move on to discovering the features that Git rebase has to offer and use regular Git merge on other branches. Youll explore Git notes and learn how to utilize the update, list, and search commands. In addition to this, youll learn how to extract metadata from repositories and automate your daily tasks using Git hooks. Youll then study in detail repository maintenance, patching, and offline sharing. By the end of the book, youll 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 forThe 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
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
Repository Maintenance
Patching and Offline Sharing
Tips and Tricks
Git Providers, Integrations, and Clients
Kenneth Geisshirt is a chemist, by education, and a strong free-software advocate. He spent his Christmas holidays in 1992 installing SLS Linux, and GNU/Linux has been his favorite operating system ever since. Currently, he does consultancy work in fields such as scientific computing and Linux clusters. He lives in Copenhagen, Denmark, with his partner and their two children. Emanuele Zattin is the Continuous Integration Specialist at Realm Inc. with experience in software development and design. He is respected for his work in designing and developing a CM Synergy to Git history conversion tool and rolling out Git-Gerrit-Jenkins in several Nokia divisions. Aske Olsson has more than 14 years of experience in the software industry. As an electrical engineer, he has been using every tool available for development, from a soldering iron over Assembly, C, Java Groovy, Python and various DSLs for programming to different SCMs and build-, CI- and issue-tracking systems. He has worked for Nokia for 6 years and, currently, works at Keylane. Aske has experience with Git; he has been teaching Git in regular training sessions, from basic Git to advanced usage. Rasmus Voss has been working with continuous integration, continuous delivery, automatic testing, and DevOps, in various industries. He has always strived to ensure that where developers, testers, project leaders, and managers can work with the system instead of against the system. Typically, the processes and solutions he develops are clear, precise, and well documented, with relevant feedback to all parts of the software development process.