# GIT ALIASES
g_push(){
  git add -A;
  git commit -m "$1";
  if [ -z $2 ]; then
    git push origin master
  else
    git push origin $2
  fi
}
g_clone(){
  if [ -z $1 ]
  then
    echo "Usage: g_clone repository_name"
    return
  fi
  git clone $GIT_USR@"$SERVER_NAME":$GIT_PORT/srv/git/$1.git
}
g_init(){
  if [ -z $1 ]
  then
    echo "Usage: g_init repository_name"
    return
  fi
  local command="mkdir /srv/git/$1.git;\
  cd /srv/git/$1.git;\
  git init --bare"
  ssh $GIT_USR@$SERVER_NAME $command;
  echo Empty repository $1.git created at $GIT_USR@$SERVER_NAME:$GIT_PORT/srv/git/$1.git
}
g_config(){
  git config --global user.email "bennett.meares@gmail.com"
  git config --global user.name "bmeares"
}

alias g_creds="git config credential.helper store"
alias gs="git status"
alias gb="git branch"

