git/

gitinit.sh

#!/usr/bin/env bash
## GIT初期化
gitinit(){
  if [ $# -ne 6 ]; then
    echo "Require [host],[user],[repo],[branch],[name],[email]"
  else
    rm -rf .git
    git init
    git remote add origin git@$1:$2/$3.git
    git fetch origin
    git reset --hard origin/$4
    git config --local user.name $5
    git config --local user.email $6
    git config --local push.default current
  fi
}

gitconfig.sh

#!/usr/bin/env bash
## GIT設定
gitconfig(){
  if [ $# -ne 2 ]; then
    echo "Require [name],[email]"
  else
    git config --local user.name $1
    git config --local user.email $2
    git config --local push.default current
  fi
}