Skip to content

Git Configλ︎

Configure Git page

Core configurationλ︎

Configure a Git identity by adding user name and email which is added to each commit created by that user

either edit the ~/.gitconfig file or run the following commands

Configure user name

Configure Git Identity
git config --global user.email=obfuscated-name@github.com

Use the email address used for the Github / GitLab account, or use and obfuscated email address provided by the GitHub account

Configure Git Identity
git config --global user.email=obfuscated-name@github.com

To check what has already been added to Git (some gui clients add information to your gitconfig), you can list all the current configuration entries using the command:

    git config --list

Later in this workshop we will see how to set up aliases for the commands and options you regularly use. We will also show how to set up specify tools for merging changes and viewing diffs (differences between files and commits).

Read the official documentation on git customisation for more options.

username and email

using obfuscated email address

Global Ignore fileλ︎

Add patterns that should be ignnored across all projects, such as editor specific configurations and operating system backup files

Example global-git-ignore file

ssh keysλ︎

generate an SSH key with

Generate SSH key
ssh-keygen -t rsa -C email-name@domain.com

provide long passphraseλ︎

TIP: Use an actual phrase or a series of random words with spaces TIP: store the passphrase in the keyring of the operating system, and have it unlock the key when you login

Developer tokenλ︎

for use with other tools such as Emacs Magit

Configure GitHub pageλ︎

Core configurationλ︎

username and emailλ︎

using obfuscated email addressλ︎

Global Ignore fileλ︎

ssh keysλ︎

Add provide a longish passphrase

TIP: Use an actual phrase or a series of random words with spaces TIP: store the passphrase in the keyring of the operating system, and have it unlock the key when you login

Generate developer tokenλ︎

  • for use with other tools