Skip to content

Instantly share code, notes, and snippets.

@katpadi
Last active January 9, 2018 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katpadi/2c3e5a11a53c0d2c1a936d93ca14d4aa to your computer and use it in GitHub Desktop.
Save katpadi/2c3e5a11a53c0d2c1a936d93ca14d4aa to your computer and use it in GitHub Desktop.
My Git Cheatsheet

Setting your branch to exactly match the remote branch:

git fetch origin
git reset --hard origin/master

.gitconfig

[user]
  name = Kat
  email = 
[alias]
  co = checkout
  st = status
[color]
  branch = auto
  diff = auto
  status = auto
[color "branch"]
  current = yellow reverse
  local = yellow
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
[color "status"]
  added = yellow
  changed = green
  untracked = cyan
[push]
  default = current
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment