GIT Essentials

Code

GIT Essentials

Install

sudo apt install git

Config

Global: config settings are stored under ~/.gitconfig

git config --list --global

System: config setting are stored under /etc/gitconfig

git config --list --system

Local: config setting are stored under *repo*/.git/config

Set Name

Locally

git config user.name "Your Name"

Globally

git config --global user.name "Your Name"

Set E-Mail

Locally

git config user.email "Your@Email.Com"

Globally

git config --global user.email "Your@Email.Com"

Inspect details

cat ~/.gitconfig

Initialize Empty Repo

Ensure you are inside the directory you want

git init
ls -a
. .. .git
  • https://git-scm.com