Rails port/Development
Contents |
Overview
The Rails Port is maintained using git, which means there's not really "one central place" for development, and you can maintain your own repository and simply ask for your changes to be integrated when you're ready.
GitHub
Sign up at
GitHub and clone a mirror of the OpenStreetMap rails.git (updated every 5
minutes). It's maintained by avar and
called openstreetmap-website:
- Go to http://github.com/openstreetmap/openstreetmap-website
- Press "fork"
You now have your own personal copy of the rails_port. Clone it:
git clone git@github.com:YOURNAME/openstreetmap-website.git
Then hack a bit and:
git add file/that/changed.rb git commit
That'll open your text editor where you can type out a good commit
message. The first line of it should be short, pretend that it's the
Subject line of an E-Mail.
Now, to push to your private copy on GitHub:
git push
To get it integrated into the main site you can:
- Send a pull request
- file a bug in trac and point to your GitHub fork
- Send an email to the rails-dev list pointing to your GitHub fork
GitHub is a commercial platform and requires registration, but it is free of charge.
Via Email
If you don't want to sign up for GitHub, you can produce patches with git commands - git format-patch and git send-email to send a patch by email to the rails-dev list.
Other Git Hosting
There's a lot of Git hosting around, you can even run your own. It really doesn't matter where or how you publish your changes (that's the nice thing about doing it "distributed"). Of course after publishing your changes you will have to make some noise about it as outlined above.
The "main" repository
The actual osm.org website is powered by a local clone of the GitHub project. Contributors generally don't clone from this repository, but for reference:
git clone git://git.openstreetmap.org/rails.git
Further reading
- The perl core guide to Git. A pretty damn good overview of a daily Git workflow. Just substitute perl for openstreetmap in your head, and skip all the scary Perl stuff.
- More git documentation at git-scm.com
- Git for Subversion users - A crash course for people used to Subversion