Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@akarzim
Last active November 20, 2019 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akarzim/7b2f24c7f0dee222b662f35f5bba497a to your computer and use it in GitHub Desktop.
Save akarzim/7b2f24c7f0dee222b662f35f5bba497a to your computer and use it in GitHub Desktop.
Git additional aliases to Prezto module using ZPlug

Git additional aliases to Prezto ZSH manager

How to use

With zplug

zplug "akarzim/7b2f24c7f0dee222b662f35f5bba497a", \
    from:gist, \
    use:git-aliases.zsh, \
    if:"(( $+commands[git] ))"
#
# Git Aliases
#
# Commit (c)
alias gcy="git cherry -v --abbrev"
alias gcY="git cherry -v"
# Fetch (f)
alias gfd="git fetch && git diff ..FETCH_HEAD"
alias gfp="git fetch --prune && git branch -r | awk '{print \$1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print \$1}' | xargs git branch -d"
alias gfP="git fetch --prune && git branch -r | awk '{print \$1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print \$1}' | xargs git branch -D"
# Source : http://stackoverflow.com/questions/13064613/how-to-prune-local-tracking-branches-that-do-not-exist-on-remote-anymore#17029936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment