Created
January 23, 2011 19:02
-
-
Save xeoncross/792324 to your computer and use it in GitHub Desktop.
Setup remote git repo over SSH
This file contains hidden or 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
# 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