Created
August 6, 2010 11:00
-
-
Save bricooke/511172 to your computer and use it in GitHub Desktop.
my .gitstuff (included in my .bashrc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git shortcuts | |
alias gc='git commit -v' | |
alias gst='git status -sb' | |
alias gcvam='gc -v -a -m ' | |
alias gcvm='gc -v -m ' | |
function gpull() | |
{ | |
if [ -z "$2" ]; then | |
BRANCH=$(git branch | grep "*" | awk '{print $2}') | |
else | |
BRANCH=$2 | |
fi | |
if [ -z "$1" ]; then | |
REMOTE='origin' | |
else | |
REMOTE=$1 | |
fi | |
CMD="git pull $REMOTE $BRANCH" | |
echo $CMD | |
$CMD | |
} | |
function gpush() | |
{ | |
if [ -z "$2" ]; then | |
BRANCH=$(git branch | grep "*" | awk '{print $2}') | |
else | |
BRANCH=$2 | |
fi | |
if [ -z "$1" ]; then | |
REMOTE='origin' | |
else | |
REMOTE=$1 | |
fi | |
CMD="git push $REMOTE $BRANCH" | |
echo $CMD | |
$CMD | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment