Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created January 23, 2011 19:02
Show Gist options
  • Save xeoncross/792324 to your computer and use it in GitHub Desktop.
Save xeoncross/792324 to your computer and use it in GitHub Desktop.
Setup remote git repo over SSH
# On the server create a empty master codebase repo
$git --init --bare
# On your machine create the repo
$git --init
# ...do git stuff and commit...
# Then add the codebase over SSH
$ git remote add codebase ssh://[email protected]:22/var/www/git/repo/
# Then back on the server we will create the public GIT facing repo
$ git clone /var/www/git/repo
# which you can then fetch when needed like
$ git pull origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment