Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gbd() {
- if [[ -n $1 ]]; then
- if [[ -n $2 ]]; then
- git push $1 :$2
- git branch -d $2
- else
- git push origin :$1
- git branch -d $1
- fi
- fi
- }
- compdef _git gbd=git-branch
- function git_diff_count() {
- foreach b (`git branch | grep -v '*' | grep -v 'master'`); echo $b `git cherry -v master $b | wc -l`; end
- }
- function git_diff_clean() {
- foreach b (`git_diff_count | awk '/([a-zA-Z0-9]+) 0/{print $1}'`); gbd trobrock $b; end
- }
Add Comment
Please, Sign In to add comment