Before You Start

Before you start using Git for the first time, you need to set two global configuration values, user.email and user.name, or else you won’t be able to make new commits. Here’s how:

$ git config --global user.name 'John Smith'
$ git config --global user.email 'jsmith@example.com'

These settings will remain in place across all your repositories, so you don’t have to reset them every time. You can also override them on a per-repository basis if you want, by running the commands in a particular repository and omitting the --global option.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.