Git Version Control System

  1. Git
  2. Setting Up git
    1. Update the System
    2. Set up a Git username:
    3. Set an email address:
  3. Configuring git
    1. To change the default branch for git,
    2. To enable colorful output with git,
    3. To set the default branch reconciliation behavior to merging,

Git

Git is a distributed version control system1.

Setting Up git2

Update the System

sudo apt update
sudo apt upgrade

Set up a Git username:

git config --global user.name ""

To confirm that you have set the username correctly,

git config --global user.name

The enclosing quotations marks are empty intentionally. You should type your username in between.

Set an email address:

git config --global user.email ""

To confirm that you have set the email address correctly,

git config --global user.email

If you opted to use the private GitHub email address, you can use a GitHub-provided noreply email address3. Then use this command instead,

git config --global user.email "id+username@users.noreply.github.com"

Configuring git

To change the default branch for git,

git config --global init.defaultBranch main

To enable colorful output with git,

git config --global color.ui auto

To set the default branch reconciliation behavior to merging,

git config --global pull.rebase false

© 2024. Mockingjays Are Just Curious.