Skip to content

Git Setup

Git

Git is a free and open source distributed version control system.

Terminal window
bash <(curl -fsSL raw.githubusercontent.com/marcosborgesphd/mac-setup/main/install) git
  1. Set up Homebrew environment

    Paste that in the terminal prompt:

    Terminal window
    if [[ "$(/usr/bin/uname -m)" == "arm64" ]]; then
    HOMEBREW='/opt/homebrew' # ARM
    else
    HOMEBREW='/usr/local' # Intel
    fi
    eval "$(${HOMEBREW}/bin/brew shellenv)"
  2. Install Git using Homebrew

    Terminal window
    brew install git
  3. Set Git username and email

    Terminal window
    git config --global user.name "Your Name"
    git config --global user.email "your@email.com"
  4. Set Git terminal colors for dark and light mode

    Terminal window
    git config --global color.ui true
    git 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"
  5. Check Git configuration

    Terminal window
    git config --global --list