scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

git-init.sh (485B)


      1 #!/usr/bin/env sh
      2 # git-init will init a git repository (on a git server)
      3 # $1 should be the name of the repository
      4 
      5 if [ "$1" = "" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
      6 	echo "Usage: git-init REPO"
      7 	echo ""
      8 	echo "'git init' multiple repos in one call. REPO should be a list of the repository names."
      9 	echo "bash expansion is useful here: 'git-init github.com/user/{repo1,repo2}"
     10 	exit
     11 fi
     12 
     13 mkdir "$HOME/$1" && ln -s "$HOME/$1" "$HOME/$1.git" && git init --bare "$HOME/$1"