Skip to content

Instantly share code, notes, and snippets.

@stipx
stipx / .gitconfig
Created September 19, 2018 08:00
Useful git aliases
[alias]
co = checkout
pullff = pull --ff-only
st = status
diffs = diff --cached
upstream = "!f() { git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD); }; f"
masterpull = "!f() { git checkout master; git pull --ff-only; }; f"
prune-branches = !git remote prune origin && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -d