Skip to content

Instantly share code, notes, and snippets.

@Eightyplus
Last active November 11, 2019 12:20
Show Gist options
  • Save Eightyplus/4a4c1c8ba488b2a8151e2231b79c3cc3 to your computer and use it in GitHub Desktop.
Save Eightyplus/4a4c1c8ba488b2a8151e2231b79c3cc3 to your computer and use it in GitHub Desktop.
git stuff
alias gb="git branch"
alias cleangit="git branch | egrep -vE \"^\*|master\" | xargs git branch -d"
alias swapgit="git branch | egrep -vEm1 \"^\*\" | xargs git checkout "
gc() { git branch | grep "$*" | xargs git checkout;}
alias cleanit="git pull && git remote prune origin && cleangit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment