From e19c12f643ebb75d02538494f15e8b3954a1dc12 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Fri, 8 Jul 2016 16:51:36 -0700 Subject: [PATCH] Add some git aliases --- dotfiles/zshrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 6363a7b..4ef5db4 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -23,6 +23,23 @@ alias stoppg='pg_ctl -D /usr/local/var/postgres stop' # This is for the mac GUI version of emacs. alias emacs-gui='open -a /Applications/Emacs.app $1' + +# Git specific aliases +alias gp='git push' +alias gs='git status' +alias gd='git diff' +alias gc='git commit -v' +alias gb='git branch' +alias gbd='git branch -d' +alias gbdd='git branch -D' +alias gpu='git pull' +alias gm='git merge' +alias gf='git fetch' + +gblame() { + git blame $1 +} + parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' }