skater coder

angela chng – Ruby on Rails / PHP web developer & skater girl in Singapore

  • blogabout stuff
  • aboutthis website
  • contactdrop a message

July 8, 2008
Posted by roadburn

Git remote repository for Rails

First install Git with these instructions if you are using Ubuntu

http://chrisolsen.org/2008/03/10/installing-git-on-ubuntu/

To create the external repository from your Rails app directory,

1
2
3
$ git status
$ git clone --bare .git app.git
$ scp -r app.git git@gitserver:/opt/repos

or SSH to your server, and set up the repository there

1
2
3
4
$ ssh myserver.com
$ mkdir /var/git/myapp.git
$ cd /var/git/myapp.git
$ git --bare init

Setting up Rails with Git

1
2
3
$ cd ~/Sites/myapp
$ git init
$ git remote add origin ssh://username@myserver.com/var/git/app.git

Create a top, project-level .gitignore file containing:

1
2
3
4
5
6
log/*.log
tmp/**/*
.DS_Store
doc/api
doc/app
public/system/**

Create some .gitignore files so the empty directories get tracked:

1
2
$ touch log/.gitignore
$ touch tmp/.gitignore

and commit:

1
2
3
$ git add .
$ git commit -m "Added initial Rails app"
$ git push origin master

Leave a comment

Posted Under Rails

No Comments Yet

You can be the first to comment!

Leave a comment

* = Required

  • CATEGORIES
    • Coding Tips
    • Food
    • Portfolio
    • Rails
    • Sharepoint
    • Wordpress

  • TAGS
    activities AD ADAM ajax architecture authentication bluehost books custom application custom form date design disk partition ECTS event id eventid moss forum guid hotfix iis imap keberos list id lists masterpage moss mysite profiles Rails rails 2.0 reporting services ruby Sharepoint sharepoint 2007 site templates site usage sql server 2005 time updates vhd virtual pc visual studio webparts workflow wss

Subscribe via RSS