Setting Up Git
Git
Git is a distributed version control system1.
Setting Up git
This2 .
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