Git plugin commands for zsh

alias g='git' alias ga='git add' alias gaa='git add --all' alias gapa='git add --patch' alias gb='git branch' alias gba='git branch -a' alias gbda='git branch --merged | command grep -vE "^(\*|\s*master\s*$)" | command xargs -n 1 git branch -d' alias gbl='git blame -b -w' alias gbnm='git branch --no-merged' alias gbr='git branch --remote' alias gbs='git bisect' alias gbsb='git bisect bad' alias gbsg='git bisect good' alias gbsr='git bisect reset' alias gbss='git bisect start' alias gc='git commit -v' alias gc!='git commit -v --amend' alias gcn!='git commit -v --no-edit --amend' alias gca='git commit -v -a' alias gca!='git commit -v -a --amend' alias gcan!='git commit -v -a --no-edit --amend' alias gcans!='git commit -v -a -s --no-edit --amend' alias gcam='git commit -a -m' alias gcb='git checkout -b' alias gcf='git config --list' alias gcl='git clone --recursive' alias gclean='git clean -fd' alias gpristine='git reset --hard && git clean -dfx' alias gcm='git checkout master' alias gcmsg='git commit -m' alias gco='git checkout' alias gcount='git shortlog -sn' compdef gcount=git alias gcp='git cherry-pick' alias gcs='git commit -S' alias gd='git diff'
Simply easier than sudo nano ~/.oh-my-zsh/plugins/git/git.plugin.zsh :D

However I did add an alias to it for removing all the deleted files in git:
# Aliases
# (custom ones)
alias grmall='git ls-files --deleted -z | xargs -0 git rm'

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.