Skip to content

Instantly share code, notes, and snippets.

@dospuntocero
Created February 17, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dospuntocero/2586f2e02b4a592a3a54 to your computer and use it in GitHub Desktop.
Save dospuntocero/2586f2e02b4a592a3a54 to your computer and use it in GitHub Desktop.
converting dreamhost in a git host
# 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