Created
September 9, 2011 18:13
-
-
Save shawndumas/1206925 to your computer and use it in GitHub Desktop.
Git init the current directory and create a new remote bare repository for it (on g:\ in this case)
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
#!/bin/sh | |
CURRENT_DIR=${PWD##*/} | |
git init | |
git add . | |
git commit -m "first commit" | |
pushd $1 | |
mkdir "$CURRENT_DIR.git" | |
cd "$CURRENT_DIR.git" | |
git init --bare | |
popd | |
git remote add origin "$1$CURRENT_DIR.git" | |
git push origin master | |
git branch --set-upstream master origin/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment