Skip to content

Instantly share code, notes, and snippets.

@reverie reverie/.bashrc
Created May 4, 2020

What would you like to do?
Git bash helpers
function c { git checkout $@; }
function b { git branch $@; }
alias s="git status"
alias d="git diff"
alias dc="git diff --cached"
alias dv="git diff | vim -"
alias l="git log"
alias gp="git pull"
alias gpu="git push"
alias cam="git commit -am"
alias delete-merged-local-branches="git branch --merged | grep -v master | grep -v staging | xargs git branch -d"
alias delete-merged-remote-branches="git branch -r --merged | grep -v master | grep -v staging | grep origin | sed 's/origin\///' | xargs -n 1 git push --delete origin"
function delete-branches-matching { git branch | grep "$@" | xargs git branch -D; }
alias gpickaxe="git log -p -S"
alias gcleanup="c master && gp && delete-merged-local-branches && git remote prune origin && delete-merged-remote-branches"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.