Created
February 17, 2016 15:22
-
-
Save dospuntocero/2586f2e02b4a592a3a54 to your computer and use it in GitHub Desktop.
converting dreamhost in a git host
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
# defining base url for the git repository | |
DREAMGIT_DOMAIN=[your server here] | |
# connecting there and creating the new base git | |
ssh $DREAMGIT_DOMAIN 'mkdir -p ~/git/'$1'.git && cd ~/git/'$1'.git && git --bare init' | |
mkdir $1 | |
cd $1 | |
git init | |
# adding "origin" | |
git remote add origin ssh://$DREAMGIT_DOMAIN/~/git/$1.git | |
touch .gitignore | |
git add . | |
git commit -m 'Created new repo' | |
git push origin master | |
echo "the new git repo '$1' its working on this remote ssh://$DREAMGIT_DOMAIN/~/git/$1.git" | |
#if you use textmate (optional) | |
mate . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment