Aske Olsson, Rasmus Voss
Git Version Control Cookbook

Git Version Control Cookbook

In Detail Starting with the Git data model, you will learn how Git stores files and how it looks at commits. You will then learn how you can recover from mistakes; from committing on the wrong branch to recovering lost commits/files. Next, you will discover how you can force rebase on some branches and use regular Git merge on other branches. You will also learn how to extract information from the repository. As you progress through this book, you will learn how you can automate the usual Git processes by utilizing the hook system built into Git. The book also covers advanced repository management, including different options to rewrite the history of a Git repository. Finally, you will discover how you can work offline with Git, how to track what is going on behind the scenes, and how to use the stash for different purposes. Approach This practical guide contains a wide variety of recipes, taking you through all the topics you need to know about to fully utilize the most advanced features of the Git system. Who this book is for If you are a software developer or a build and release engineer who uses Git in your daily work and want to take your Git knowledge to the next level, then this book is for you. To understand and follow the recipes included in this book, basic knowledge of Git command-line code is mandatory.
Sign up to use

Reviews

Photo of Ferdinando Santacroce
Ferdinando Santacroce@jesuswasrasta
5 stars
Oct 6, 2021

This Git cookbook is a great companion. Like every cookbook, this tool is pretty useless if you don’t know “how to cook”; the purpose of this collection of recipes is to help a good cook to become a great chef, supplying a wide range of recipes. This book is not a “from beginning to end” kind of book; you can read it in a random way, looking for the right recipe for the situation. I really enjoyed how Aske Olsson and Rasmus Voss taken care about the “explanation” part of recipes; this is not a book where you find only commands to type mechanically, but there are wide explanations and graphics to help the reader understand what the command is about to do. The book is organized in 12 chapters, grouped by working areas. In 1st chapter there are a bunch of good recipes to improve the way you sail in the sea of a Git repository; in 2nd chapter we finally get explained the “have-to-know” config options; 3rd chapter is for the trees lovers: branching and merging will have no more secrets after this. The 4th chapter is for rebasing, a powerful feature in Git, sometimes hard to master. Have you ever heard about Git notes? If not, 5th chapter is for you. 6th chapter is for data diggers: if you like grepping data here and there, now you can learn how to do it in a Git repository. The 7th chapter illustrates Git hooks, while 8th chapter helps us to deal with common mistakes (I found this chapter very useful!). In the 9th chapter you can reach the title of “master”: you will find recipes to pruning branches, split repositories, deal with submodules and related merge operations. 10th chapter is for patching, while 11th is for low level commands. A the end, in the 12th chapter you will find a much appreciated collection of tips and trick like aliases, auto completion, stashes and so on. I recommend this book for Git users who wants to improve their skills, going deep to realize what happens under the hood when needed. If you are a newcomer, if you have little or no experience with Git you'd better read this book at a later time. For the rest, I really enjoyed the book layout: you can easily distinguish command lines from descriptive part; titles and paragraphs are highlighted properly and illustrations appears just where they are needed. Good job guys, and good job Packt too! :)