Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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