-
-
Save Fastidious/828bb1ee27b5f46b9eb7d693a69d5f33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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