Dr Nic

Git for Rubyforge accounts

, posted in Git, RubyForge, ∞, 27 comments

spacer

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:

  1. the end is nigh for empty or unmaintained SVN repositories
  2. 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 rubyforge.org/projects/pastiepacker for example.

spacer

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?

From the FAQ:

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?

I can’t tell you. Its a secret.

Related posts:

  1. GitHub and TextMate Unite I wanted to go from a source file to the...
  2. Using Git within a project (forking around) In Star Wars, when Grand Moff Tarkin orders the...

27 Responses to “Git for Rubyforge accounts”

  1. Nome do Jogo » Artigo » Rubyforge se rende ao Git says:
    April 8, 2008 at 1:50 pm

    [...] vi primeiro no blog do Dr Nic, e resolvi conferir. Pois é, o Rubyforge agora também aceita projetos em Git. É… não tem [...]

  2. spacer Johan S says:
    April 8, 2008 at 9:05 pm

    Yay! Git is the new svn

  3. spacer Jon Garvin says:
    April 9, 2008 at 4:03 am

    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.

  4. spacer Dr Nic says:
    April 9, 2008 at 10:02 am

    @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.

  5. spacer Alex Soto says:
    April 9, 2008 at 6:03 pm

    @jon – haven’t tried it myself but you should check out braid

  6. spacer cypher says:
    April 9, 2008 at 6:25 pm

    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.

  7. A Fresh Cup » Blog Archive » Double Shot #183 says:
    April 9, 2008 at 10:52 pm

    [...] Git for RubyForge Accounts – Dr. Nic explores. [...]

  8. spacer Trevor Turk says:
    April 10, 2008 at 1:37 pm

    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:

    rubyforge.org/scm/?group_id=4477

  9. spacer James Zhuo says:
    April 12, 2008 at 10:07 am

    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.

  10. spacer Dr Nic says:
    April 12, 2008 at 10:30 am

    @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 spacer

  11. spacer Aman Gupta says:
    April 14, 2008 at 8:30 am

    Any way to convert an existing project?

  12. spacer Dr Nic says:
    April 14, 2008 at 8:36 am

    @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 spacer

  13. Nome do Jogo » Artigo » Rails Podcast Brasil - Episódio 13 says:
    April 16, 2008 at 11:38 pm

    [...] Git for Rubyforge accounts [...]

  14. spacer Dr Nic says:
    April 17, 2008 at 12:13 pm

    Ok, here’s a step-by-step guide to converting SVN -> Git repository on Rubyforge:

    spacer
    Uploaded with plasq‘s Skitch!
  15. reality » Blog Archive » 網摘 - Rails on Git (持續更新) says:
    April 18, 2008 at 11:16 pm

    [...] Git for Rubyforge accounts@ Dr. Nic [...]

  16. spacer james says:
    April 27, 2008 at 6:53 am

    One comment about Rubyforge: Great site but navigation is very confusing b/c projects “docs” links never contain any docs!

  17. spacer Jon says:
    April 29, 2008 at 8:28 pm

    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. spacer

  18. spacer Dr Nic says:
    May 2, 2008 at 1:17 pm

    @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 spacer

  19. Cohosting on Rubyforge & GitHub | Open Sourcery says:
    May 2, 2008 at 7:27 pm

    [...] to Dr Nic Williams for highlighting this at such an awesome time. I’ve got the source for [...]

  20. spacer simmel says:
    May 11, 2008 at 3:19 am

    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 pastie.caboo.se/194848

  21. spacer Dr Nic says:
    May 11, 2008 at 7:18 am

    @simmel – oh that is very cool, thx!

  22. spacer Benjamin Kudria says:
    June 25, 2008 at 2:55 pm

    For some reason, I had to do my escape a bit differently:
    pastie.org/221653

  23. Paul Dowman » Blog Archive » Got Git says:
    July 26, 2008 at 10:20 pm

    [...] At first I found it funny that even though they were moving to a distributed version control system, everyone decided to keep their repositories in the exact same place. Being distributed, a Git repository doesn’t need to be hosted unless you’re sharing it. You can publish it easily on any web server, and RubyForge (which has always been the most popular place to host Ruby projects) supports git. [...]

  24. spacer elliottcable says:
    July 28, 2008 at 4:26 pm

    Regarding your little bash script… there’s a much easier way. You can actually add multiple url configuration entries for each git remote in the config file, as I describe here:

    blog.elliottcable.name/posts/multi_destination_git_remotes.xhtml

    (Gist’s still having trouble with its embed code, so here’s a direct link to the code that should show up on that page: gist.github.com/2015)

  25. jwz threading on GitHub « Frederik’s Weblog says:
    September 1, 2008 at 7:21 am

    [...] sure if posting gems via GitHub is sufficient, I’ve registered a new project on RubyForge. They now support Git too, which makes it super easy to push my changes to both “hubs”. So, you will most [...]

  26. spacer sohbet says:
    October 12, 2008 at 6:54 am

    thanks you spacer

  27. spacer Turk Admin says:
    October 12, 2008 at 7:00 am

    Thanks for the tips, Dr Nic!
    See you

spacer Subscribe Now!

Follow me on Twitter

    loading...
WorkingWithRails is the online home of the world's community of Ruby on Rails users. Go vote for me there, I dare you!
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.