From 22643050ee2099a0530305a36773b27bb7bb5fda Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 17 Dec 2016 11:47:17 -0500 Subject: [PATCH] Add Git helper functions --- .zshrc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.zshrc b/.zshrc index d6f1800..9db057d 100644 --- a/.zshrc +++ b/.zshrc @@ -56,5 +56,32 @@ up() { cd $str"$2" } +# Git helper functions +psh() { + branch=`git branch 2> /dev/null | grep \* | awk '{print $2}'` + git push origin $branch "$@" +} + +pll() { + branch=`git branch 2> /dev/null | grep \* | awk '{print $2}'` + git pull origin $branch "$@" +} + +a() { + git add "$@" +} + +s() { + git status +} + +c() { + git commit "$@" +} + +ca() { + git commit --amend "$@" +} + # default file openings alias -s ipr=open