Skip to content

Instantly share code, notes, and snippets.

@stipx
Created September 19, 2018 08:00
Show Gist options
  • Save stipx/8aa923869cd637831364ee4e763bdc5c to your computer and use it in GitHub Desktop.
Save stipx/8aa923869cd637831364ee4e763bdc5c to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment