Git for Rubyforge accounts

First there was CVS, then came SVN to RubyForge. Actually, I’m guessing that CVS was the sole SCM initially, and SVN was added later. I just can’t imagine them starting RubyForge from scratch and explicitly saying “yeah we’ll offer CVS because …”. I don’t know how that sentence would have finished. It must have been added first. There is no valid “because …”.
But now, with each RubyForge project there is a Git repository. This is great for two very good reasons:
- the end is nigh for empty or unmaintained SVN repositories
- less centralised decentralised development
GitHub + Gitorious are the go-to-guys for somewhere to hang your proverbial hat: somewhere you push your local git repository to so other people can access it.
Yet when I’m investigate someone’s new RubyGem or other project, the first place I look for its source is RubyForge. I assume the project name is the same as the gem name, and goto http://rubyforge.org/projects/pastiepacker for example.
Then I click on the SCM tab. Normally this gives SVN instructions. In this modern era, many projects SVN repos can now be blank or unmaintained with Git repos being preferred by many.
So, the reason to push your git repository to RubyForge’s new git system is to make life easier for me. I mean, I don’t know who else clicks on the SCM link, but I do.
While this is all well and great for new projects - you can select “git” instead of “svn” as per the first image above - but I’m not yet sure how to migrate old projects [follow support ticket].
The other reason is to actually help your distributed repository be distributed. Push it to github. Push it to gitorious. And now you can push it to rubyforge. Sweet.
Adding another remote repository
Since your default remote repository is probably called “origin”, you may wonder how such a naming schema could ever expand to multiple remote repositories? Might I suggest “rubyforge” as the name of the rubyforge repository?
git remote add rubyforge gitosis@rubyforge.org:pastiepacker.git git push rubyforge master git push origin master
If you do this for all your projects, perhaps a bash script is in order:
function gpall() {
git push rubyforge master
git push origin master
}
One project equals one repository, but multiple packages
Using a Rubyforge project’s git repository might be problematic where you release multiple packages/rubygems (codeforpeople, seattlerb, mongrel, drnicutilities, etc). Here I’d prefer one repository per package, rather than one repository for the whole “project”.
Perhaps you could push the master branch from your local repository for each package into different branches of the rubyforge git repository. Thoughts?
Can’t push to your rubyforge git repo?
RubyForge Git repositories are managed via gitosis; gitosis does authentication via public keys. This means that in order to push to a RubyForge Git repository you’ll need to upload a public key to your account - see notes on that here.
Generally, Git support is something we’ve just introduced, so feedback about it on the forums would be quite welcome.
What is Pastie Packer?
Trackbacks
Use this link to trackback from your own site.


[...] vi primeiro no blog do Dr Nic, e resolvi conferir. Pois é, o Rubyforge agora também aceita projetos em Git. É… não tem [...]
Yay! Git is the new svn
Thanks for the post.
What about projects already on Rubyforge using SVN. Is it possible to migrate them to Git? Is this even advisable or should they stay put?
Also, a future post describing how a Rails project managed in SVN can install and manage external plugins hosted on Git (and visa-versa) would be appreciated? Is this even possible? I honestly have no idea.
@ALL - OpenID on site is sort of broken - your comment should be submitted, but you might be shown a blank page. Go back, reload, and see if comment is there.
Working on a fix. I killed the php.log file and now no log is going there. I guess i need to get TextDrive to restart apache or something. Bah.
@jon - haven’t tried it myself but you should check out braid
If you have one project but multiple packages, you can try using git-submodule. You’d still need repos for each individual package, but with GitHub and Gitorious around, that shouldn’t be too much of a problem.
[...] Git for RubyForge Accounts - Dr. Nic explores. [...]
Done and done. Thanks for the tips, Dr Nic!
You can grab my project off of RubyForge very easily, even though it’s real home is at github:
http://rubyforge.org/scm/?group_id=4477
So what are the strength of Git compared to say SVN? To me SVN works really well and I see no real reason to move to Git unless if there are compelling enough reasons to do so.
@James Zhuo [via] - for me it was git-svn initially, so I could take my repos offline. Then I found git ideal for the process of updating the rails textmate bundle with so many contributors + so many new files. Much easier on me and on contributors.
As a contributor to other ppls’ projects it is so easy to have your own repo locally and/or a remote clone/fork, and not have to wait patiently for patches to be accepted or not, whilst leaving your svn status report showing a dozen notices of new/missing files.
My workflow for working on commerical + open source process, both mine + other peoples, has improved significantly. Except when I hit gitcups. Hiccups in living with git where you’re forced to learn another of the 150 git-* operations or the dozen options they each have. But its a happy price to pay
Any way to convert an existing project?
@Aman Gupta [via] - the current method (discussed here) is to raise a ticket on the Rubyforge support forum asking for your svn repo to be closed down and a git repo created. So you’ll need to have git-svn’d your repo already before asking this, or things might get nasty for you
[...] Git for Rubyforge accounts [...]
Ok, here’s a step-by-step guide to converting SVN -> Git repository on Rubyforge:
Uploaded with plasq’s Skitch!
[...] Git for Rubyforge accounts@ Dr. Nic [...]
One comment about Rubyforge: Great site but navigation is very confusing b/c projects “docs” links never contain any docs!
Hey Dr. Nic,
I just shot you an email and got this response:
“I am offline til Tuesday 27th November. See you then.”
Seriously? If so, well done, that’s a nice long break from the digital grindstone.
@jon - heh, no that was wrong. I’m sure I changed the date in the message when I turned on the Holiday Autonotification. I’m back from holidays and back on the grindstone
[...] to Dr Nic Williams for highlighting this at such an awesome time. I’ve got the source for [...]
I like automagic especially when it works the way I want it to and when I just have to configure stuff once. This is how I publish my stuff at both gitorious and rubyforge http://pastie.caboo.se/194848