Setting up a Git repo at Dreamhost
For some of the items I’m tinkering with lately, I’ve decided to have an offsite, secondary git repository. I followed the directions from this Dreamhost Wiki page to get everything up and running.
For the impatient among you (like myself), here are the absolutely essential parts:
?Download gitsetup.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Setup SSH keys [local ~]$ ssh-keygen -t rsa [local ~]$ ssh-copy-id [user@]host [local ~]$ eval `ssh-agent` [local ~]$ ssh-add # Create the local repository [local ~]$ cd project [local project]$ git init [local project]$ touch .gitignore [local project]$ git add . [local project]$ git commit # Create a bare remote repository [local project]$ ssh [user@]host [host ~]$ mkdir project.git [host ~]$ cd project.git [host project.git]$ git --bare init [host project.git]$ exit # Push to the remote repository [local project]$ git remote add origin ssh://[user@]host/~/project.git [local project]$ git push origin master [local project]$ git branch --set-upstream master origin/master # Clone from the remote repository (optional...from another machine) [other ~]$ git clone ssh://[user@]host/~/project.git |
Mario Aquino said,
Wrote on May 30, 2010 @ 6:59 am
Git is central to Heroku’s deployment strategy. Have you used Heroku?
Also, have you considered using DropBox as a git storage service?
eric said,
Wrote on May 30, 2010 @ 7:44 am
Mario,
Since I’ve only slightly dabbled in Ruby, I’ve never deployed anything to Heroku. I’ve checked out the site a couple of times and it looks very cool.
I never thought about leveraging Dropbox…but that’s a damn good idea!