Created
November 14, 2013 03:41
-
-
Save younata/7460963 to your computer and use it in GitHub Desktop.
bash script to create git repo on server using ssh...
This file contains 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 | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <reponame>" | |
else | |
echo "creating $1.git" | |
mkdir $1.git | |
cd $1.git | |
dir=$(pwd)/$1.git | |
git --bare init | |
cd ../ | |
echo "now, set the remote to use ssh://`whoami`@`hostname`:<ssh port>$dir" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment