Book Image

Git Best Practices Guide

By : PIDOUX Eric
Book Image

Git Best Practices Guide

By: PIDOUX Eric

Overview of this book

Table of Contents (12 chapters)

Preface

Git is a decentralized versioning system that was created by Linus Torvalds (also the creator of Linux Kernel) under the GNU license. It was developed to be simple and efficient. Its aim is to manage the content evolution of a file tree.

This book is an easy-to-follow guide to understand the basic to the deepest levels of Git's abilities. As a Git user (beginner or experienced), you will face some basic questions, such as: how do you find the code you changed just a few weeks ago? Is it possible to work with other team members using Git? In case of conflict, how can I resolve it?

Git Best Practices Guide will help you to answer these questions by increasing your skills on Git (learning a practical way to use Git commands with examples).

If you are an SVN user, we will also see how it is possible to easily migrate an SVN repository to Git with a step-by-step guide.

Starting with the basics of Git, this book will lead you to the advanced features, making you more self confident when there are merge conflicts or issues while finding content.

The last part of this book will teach you how to improve your workflow using Git. More and more companies or team members use Agile as a workflow process, leaving behind old-fashioned processes such as waterfall, cascade, iterative enhancement, and so on. As a versioning system, Git has to be a part of this process. In this book, we will see how to take your workflow to another level by creating an efficient branching system, using Continuous Integration, and discovering repository managers.

What this book covers

Chapter 1, Starting a Git Repository, covers the basics of Git, describing how to create a repository and start committing files.

Chapter 2, Working in a Team Using Git, explains the best practices to work with other developers as a team by pointing out the useful commands.

Chapter 3, Finding and Resolving Conflicts, covers all tips and commands that are useful to fix mistakes, resolve conflicts, search inside the commit history, and so on.

Chapter 4, Going Deeper into Git, explains the hard commands or not-so-commonly-used commands such as applying patch, using submodules, and migrating from SVN.

Chapter 5, Using Git for Continuous Integration, explains how to improve the team workflow by using Continuous Integration.

What you need for this book

To run commands provided in this book, you need the Git software.

Who this book is for

If you are a Git user (beginner or experienced), you want to learn all Git features without heavy theory, or you need to have a practical book to use Git, then this book is for you.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "If the repository is public, it will create a folder and everything inside the folder."

Any command-line input or output is written as follows:

Erik@server:~/git/myRepoName$ git log
commit df9448ff53864d8cfc6f78fd8831fd363d63a28b
Author: Erik <[email protected]>
Date:   Thu July 10 06:44:47 2014 +0000

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on Begin Import."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.