Introduction
Welcome. If your job or interests involve designing, creating, or testing software, or managing any part of a software development lifecycle, chances are that youve heard of Git and, at some level, have tried to use and understand it. This book will help you reach that goal. To put it simply, Professional Git is intended to help you understand and use Git to get your job done, whether that job is a personal project or a professional requirement. In the process, it will also make Git part of your professional comfort zone. Throughout the book, Ive provided the background and concepts that you need to know (and understand) to make sense of Git, while you learn how to interact with it.
This section will provide you with a quick introduction to the book. It will explain how this book is unique from other books about Git, the intended target audience, the books overall structure and content, and some of the value it offers you.
I encourage you to take a few minutes and read through this section. Then, you can dive into the material at your own pace, and build your skills and understanding of Git through the text and the included hands-on labs. Or, if youd like to quickly see additional information about the range of content, you can browse the table of contents.
Thanks for taking a look at Professional Git.
HOW THIS BOOK IS UNIQUE
While many books about Git are already on the market, most are aimed at providing the technical usage of the application as their major and singular goal. Professional Git will provide you with that, but it will also provide you with an understanding of Git in terms of concepts that you probably already know. As well, most books do not provide practical ways to integrate the concepts they describe. Learning is most effective when you have actual examples to work through so you can internalize the concepts and gain proficiency at your pace. Professional Git includes Connected Labs that you can work through to absorb what youve just read.
Ive included simple, clear illustrations to help you visualize key ideas and workflows. Ive also included Advanced Topics sections at the end of many chapters. These sections provide additional explanations of how to use some lesser-known features of Git as well as how to go beyond the standard Git features to gain extra value.
It is easy to experience a bad transition from another source management system to Git, if you dont understand Git. To be most effective, you need to comprehend the Git model and workflow. You should also know what to watch out for as you make the transition and why its important to consider not only the commands and workflow, but also the structure and scope of its underlying repositories. I cover all of this in Professional Git.
TARGET AUDIENCE
This book is based on my years of training people on Git; these people worked at all levels and came from many different backgroundsdevelopers, testers, project managers, people managers, documentation specialists, and so on. I have presented the basic materials outlined in this book through many workshops at industry conferences and corporate training sessions. Ive presented them at locations across the United States, as well as internationally. Ive been successful in helping people to walk away with a newfound confidence in using Git.
I only make one assumption in this book: that you have experience with at least one source management system. It doesnt matter which one: CVS, Subversion, Mercuryany will do. I just assume that you have a basic awareness of what a source management system does as well as fundamental concepts such as checking in and checking out code and branching. Beyond that, you do not require any prior knowledge or experience. And even if you have significant experience with Git or another system, youll find something of benefit here. In fact, if youre reading this, then you probably fall into one of the following categories:
- You are new to Git and know that you need to learn it.
- You have used Git but have been trying to use it the same way you used your previous source control system.
- You have used Git and feel that you know just enough to be dangerous.
- You are getting by with Git, but really want to understand why it works the way it does and how to really use it as intended.
- You work with, or manage, people who either use Git or need to learn it. Given that association, you need to know about Git and to understand the fundamental concepts.
- Youve heard about the potential benefits of Git, and so you are curious about it and about what it can do for you and the organization you work with.
You may actually see yourself in more than one of these categories. However, you probably just want to be able to get your job done (whether that job is a personal or professional goal). This book was built on that premise.
Git requires a mind shift. In fact, it requires a series of mind shifts. However, each shift is easy to understand once you can relate it to something you already know. Understanding each of these shifts will, in turn, allow you to be more productive and to harness the features of this powerful tooland thats what this book is about.
STRUCTURE AND CONTENT
This book is organized as a series of chapters that present Git from the ground up, teaching you what you need to know and build on to become proficient before adding new concepts.
In the first three chapters, I cover the foundational concepts of Git: how its different from other systems, the ecosystem thats been built around it, its advantages and challenges, and the model that allows you to understand its workflow and manage content effectively with it. This section will provide you with a basic understanding of the ideas, goals, and essential terminology of Git.
In the remaining chapters of the book, I cover the usage and features of Git, from performing basic operations to create repositories and commit changes into them, to creating branches, doing merges, and working with content in public repositories.
Notice that I dont have you using Git right away. (If you want to do that, feel free to jump ahead to , will provide the foundation you need to understand the remaining chapters. And even if youve used Git before, reading these chapters may clear up questions that youve had about Git, give you a better mental model to work from, and form a basis to understand some of the more advanced concepts.
READER VALUE
Throughout the book, youll find examples and guidance on the commands and workflows you need to be productive with Git. Each chapter includes ways to relate concepts to what you already know and understand. In addition to the text, youll find many illustrations to help you understand concepts visually. As Ive already mentioned, this book also adds a feature that allows you to get hands-on experience with Git, via Connected Labs interspersed throughout the chapters. These labs are designed to reinforce the concepts presented in the text of the preceding chapter(s) and to get you actively involved in the learning process, allowing you to better grasp the concepts. To get the most out of the book, you should take the time to complete each labusually only a few minutes. Youll find that these simple steps will greatly increase your overall understanding and confidence when using Git.
As well, take a look at the Advanced Topics sections, located at the end of some chapters. Youll likely find explanations and ideas to leverage Git functionality in ways you may not have considered before, or you may find out how to use that feature youve always wondered about.
Next page