Skip to content

Instantly share code, notes, and snippets.

View catsby's full-sized avatar
🏠
Working from home

Clint catsby

🏠
Working from home
View GitHub Profile
@catsby
catsby / gist:943028
Created April 26, 2011 20:16 — forked from schacon/gist:942899
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{sub(/origin\//,"");print}' |
xargs git push origin --delete
git_prompt() {
unset __CURRENT_GIT_BRANCH
unset __CURRENT_GIT_BRANCH_STATUS
unset __CURRENT_GIT_BRANCH_IS_DIRTY
local st="$(git status 2>/dev/null)"
if [[ -n "$st" ]]; then
local -a arr
arr=(${(f)st})