O'Reilly logo

Professional Git by Brent Laster

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4Configuration and Setup

When starting to use Git, it's important to configure it so that it works properly in your particular environment. You'll also want to be able to manage your content and your interactions with Git in a way that you prefer. In this chapter, you will learn how to configure your Git environment, and explore the different considerations that come into play. You'll look at some of the key required items such as line endings, as well as some of the more significant optional settings. You'll also learn how to define settings within the different scopes that Git allows.

In the “Advanced Topics” section, I'll describe how the init command works, offer more detail about what's actually in the underlying repository, and show you how to create aliases that take parameters that can run small programs.

EXECUTING COMMANDS IN GIT

As I previously mentioned, this book focuses on the Git command line to provide the most universally applicable way to use the tool. The general form of commands is as follows:

git <git-options>  <command>  <command-options>  <operands>

Table 4.1 describes the different parts of this form.

Table 4.1 Components of a Git Command ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required