Close and Go BackBack to Viget

Git with remotes and SVN

Ben Scofield
Ben Scofield, Development Director, April 01, 2008 4

The laziness plugin I’ve been working on is hosted in two different SCM systems: Subversion, at Viget’s SVN repository, and git, at GitHub. I use git in development, which means that pushing out to GitHub is easy - but maintaining a git-svn connection at the same time is a little tricky.

Starting from this post, I finally got things moving. Basically, I created a local branch to interact with SVN independently of the main development; when new features (like the specific exception handling I added recently) are done, I push ‘em out to GitHub normally. Then I switch into the aforementioned local branch, merge from master, and dcommit them up.

The only problem I’ve run into is the occasional conflict on merging from master - and that’s easily resolvable by editing the conflicted file and git adding it before committing and dcommitting.

I long for the day when I can get by on git alone, but until then this appears to be a workable solution.

Gil said on 04/04 at 11:26 AM

Curious...what is it that you like so much about Git? How does it fit into your development process?
I have yet to play with it..

Ben Scofield said on 04/04 at 12:16 PM

There are a couple of things I love about git. In no particular order:

- Local branching is dead easy, and is a viable option for getting small things done more efficiently (unlike in SVN where branches are somewhat weightier). I can be in the middle of a two-day feature, jump back to the master branch to fix a bug quickly and deploy it, then switch back to my feature branch and pick up where I left off.
- Offline commits help keep commit points frequent and relatively small, which is a huge plus.
- Git’s clone/push/pull strategy (especially as embodied in GitHub) make contributing to other people’s projects ridiculously easy, and lowering the barrier to contribution results in a higher quality product.

When you combine those with git’s SVN integration, it’s a no-brainer - you can have your normal Subversion functionality plus the new hotness, all at once.

ynw said on 04/20 at 11:06 AM

Would you consider this solution viable also for uses less experienced in SCM?

Thank.

Ben Scofield said on 04/20 at 12:06 PM

Depends on exactly how little experience you have with SCM - I’d definitely suggest you be comfortable with SVN first, so that you have a better chance of fixing things if they go cross-eyed. In a perfect world, I’d also suggest you play around with git proper first, too, but I think that’s a little less important.

Trackback URL: http://www.viget.com/trackback/1008/

Comments for this entry were closed after 60 days.

A Development Community for Viget Labs and Beyond

Every team member here at Viget Labs strives to be an innovator. We members of the development team are no different - that's why we're constantly engaging in community discussions and exploring the unknown that is the next generation of open-source web applications.

Viget Is Hiring!

Viget has job openings for Ruby Developers, Interns, and Front-End Developers. Learn More »

Recent Comments

I think that polymorphic_url(@commentable, :anchor => “comment_#{@comment.id}") should work. You can also refactor the “comment_#{@comment.id}” to a separated method, like dom_id, which returns the dom identifier of the comment.