Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.23 KB

git-setup.md

File metadata and controls

60 lines (42 loc) · 1.23 KB

Git

Git

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

Install and set up git

Option 1 - Easy install using mac-setup:

bash <(curl -fsSL raw.githubusercontent.com/monsieurborges/mac-setup/master/install) git

Option 2 - Install on your own:

Define HOMEBREW_PREFIX

if [[ "$(/usr/bin/uname -m)" == "arm64" ]]; then
    HOMEBREW_PREFIX="/opt/homebrew"
else
    HOMEBREW_PREFIX="/usr/local"
fi

eval "$(${HOMEBREW_PREFIX}/bin/brew shellenv)"

Install git

brew install git

Set git user name and email

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Set git terminal colors

git config --global color.ui true
git config --global color.status.changed "blue normal"
git config --global color.status.untracked "red normal"
git config --global color.status.added "magenta normal"
git config --global color.status.updated "green normal"
git config --global color.status.branch "yellow normal bold"
git config --global color.status.header "white normal bold"

Check Git configuration

Check your name and e-mail:

git config --global --list