Git tips and tricks

Commits

Stages

Tags

Branches

Submodules

Config .gitconfig

[user]
  name = Your Name
  email = your@example.email
[alias]
  co = checkout
  br = branch
  st = status
  cm = commit -m
  cam = commit --amend
  ds = diff --staged
  fix = commit --fixup
  squash = commit --squash
  pr = pull --rebase
  rc = rebase --continue
  ri = rebase --interactive --autosquash
  ra = rebase --abort
  rs = rebase --skip
  sub = submodule update --init
  hi = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
  show-files = show --pretty="format:" --name-only
[rerere]
  enabled = 1