Skip to content

Instantly share code, notes, and snippets.

@zikes
Created March 3, 2017 21:31
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save zikes/926fd8bb72f9856776e309fba45f07cc to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
usage() {
cat <<HERE
usage: git make-remote <project-name>
or: git make-remote <path/to/project-name>
HERE
}
GIT_SERVER="git.zikes.me"
GIT_USER="git"
case $# in
1)
ssh $GIT_USER@$GIT_SERVER "mkdir -p $1.git && cd $1.git && git init --bare"
git remote add origin $GIT_USER@$GIT_SERVER:$1.git
exit 0
;;
*)
usage && exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment