Skip to content

Commit

Permalink
Add git machete aliases and change gmaintenance to not remove local b…
Browse files Browse the repository at this point in the history
…ranches that have been merged into master
  • Loading branch information
GMadorell committed Mar 18, 2021
1 parent 190d1f5 commit a618ccd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -821,11 +821,11 @@ alias grp="git remote prune origin" # Remove branches locally that have already
alias gprune="grp"
alias grinfo="git remote | xargs git remote show"
alias grshow_all="grinfo"
alias grmmerged="git branch --merged master | grep -v 'master$' | xargs git branch -d" # Remove local branches that have already been merged into master
alias grmmergedmaster="git branch --merged master | grep -v 'master$' | xargs git branch -d" # Remove local branches that have already been merged into master
function gmaintenance() {
gprune --dry-run | grep "\[would prune\]" | ltrim " " | ltrim "* [would prune] origin/" | git_branch_exists_filter | xargs git branch -D
gprune
grmmerged
# grmmergedmaster # Seems to not be needed?
}

function gcurrent_branch_name() { git rev-parse --abbrev-ref HEAD ; }
Expand Down Expand Up @@ -1017,6 +1017,12 @@ function git_integrate_single() {
}
alias gintegrate_single=git_integrate_single

# Git machete aliases
alias gms="git machete status"
alias gmu="git machete update"
alias gmt="git machete traverse --fetch"
alias gmtall="git machete traverse --fetch --whole"

# Greeting Message
function greeting() {
fortune | randomcowsay | lolcat -F 0.05
Expand Down

0 comments on commit a618ccd

Please sign in to comment.