Git Installation and Basic Configuration
Installation
Installing Git: A Simplified Guide for Linux, macOS, and Windows
Linux Using Terminal
1
2
3
4
sudo apt install git \\Debian
sudo dnf install git \\Fedora 22 and later
sudo yum install git \\Red Hat
sudo pacman -S git \\Arch
MacOS Using Terminal
1
2
xcode-select --install \\Using Xcode
brew install git \\using Homebrew
Download and install Windows setup from here
Winget Use CMD or Terminal
1
winget install git
Using Command line or PowerShell (Chocolatey)
1
choco install git.install \\Using Chocolatey
Basic Configuration
Setup user name and email address:
1
2
git config --global user.name "Your Name"
git config --global user.email yourname@example.com
Setup editor:
Linux/MacOS
1
git config --global core.editor nano
Windows
1
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
View configurations:
1
git config --list
Git Usage
1
git init
git init - Create an empty Git repository or reinitialize an existing one
This post is licensed under CC BY 4.0 by the author.