How to configure Git

Git is a version control system by Linus Torvalds, same person who wrote linux kernel.

Installation

In Archlinux, you can install git by:

1
$ sudo pacman -S git

In Debian and derived distributions:

1
$ sudo apt install -y git

Configuration

You have to tell git about the author who committed changes so lets do it.

Name and Email

Tell git about your name and email:

1
2
$ git config --global user.name 'John Doe'
$ git config --global user.email 'your_email@domain.com'

Replace John Doe and with your name and your_email@domain.com with your name and email.

Signing key

If you use gpg to sign the commits/tags, you have to tell git about your signing key.

1
$ git config --global user.signingkey 'your_email@domain.com'

Replace your_email@domain.com with your email address you used when creating gpg keypair.