Use the below instructions to install and configure Git on your computer.
Homebrew is a software package management system that simplifies the installation of software on macOS
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If offered to “Install Command Line Developer Tools”, choose
yes
, then continue. The Terminal won’t show characters while typing passwords. Backspace several times if you make a mistake.
Homebrew 4.4.3...
)brew --version
brew install git
Most Linux systems – including Ubuntu and Raspberry Pi OS – are Debian-based.
Use the Advanced package tool (APT) to install Git then proceed to Configure Git.
sudo apt update
sudo apt upgrade
sudo apt install git
git --version
# -> git version 2.38.1
Replace Your Name (inside the quotes). Press return after each line
git config --global user.name "Your Name"
git config --global user.email youraddress@example.com
git config --global init.defaultBranch main
git config --global pull.rebase false
LF
(see also Configuring Git to handle line endings)git config --global core.autocrlf input
Windows users should use the following to auto-convert CRLF
line endings into LF
when you commit
git config --global core.autocrlf true
git config --list