Git
Git is a distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Created by Linus Torvalds in 2005, Git allows multiple developers to work on a project simultaneously without overwriting each other’s changes, making it an essential tool for collaborative software development.
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