Git Setup
Git is a free and open source distributed version control system.
Installing Git via Mac-Setup CLI
Section titled “Installing Git via Mac-Setup CLI”bash <(curl -fsSL raw.githubusercontent.com/marcosborgesphd/mac-setup/main/install) git
Installing Git manually
Section titled “Installing Git manually”-
Set up Homebrew environment
Paste that in the terminal prompt:
Terminal window if [[ "$(/usr/bin/uname -m)" == "arm64" ]]; thenHOMEBREW='/opt/homebrew' # ARMelseHOMEBREW='/usr/local' # Intelfieval "$(${HOMEBREW}/bin/brew shellenv)" -
Install Git using Homebrew
Terminal window brew install git -
Set Git username and email
Terminal window git config --global user.name "Your Name"git config --global user.email "your@email.com" -
Set Git terminal colors for dark and light mode
Terminal window git config --global color.ui truegit config --global color.status.changed "yellow bold"git config --global color.status.untracked "red bold"git config --global color.status.added "green bold"git config --global color.status.updated "cyan bold"git config --global color.status.branch "magenta bold"git config --global color.status.header "cyan bold" -
Check Git configuration
Terminal window git config --global --list