External git merge on OS X

The default merging behavior of git is pretty good - until it blows chunks and litters your merged file with dozens of >>>> markers. I had this happen to me again this weekend, and was finally motivated to do something about it.

To change the default merging behavior in git, you run

git config --global merge.tool toolname

To see the list of available tools, type

git mergetool

Most of the tools that git understands are unix-y. There is one OS X tool on the list: opendiff, which launches the FileMerge tool. But honestly, I've never been that impressed with FileMerge's merge algorithm.

Fortunately, xxdiff is a pretty good tool, and it's available as a Darwin port. So, assuming you already have your OS X box set up to install ports, you can have this as your default git merge user interface by running:

sudo port install xxdiff
git config --global merge.tool xxdiff

Now files needing a merge will open in the xxdiff user interface - which is an ugly XWindows thing, but it's powerful. I'd love to see git hook up to something like Araxis Merge or Changes (when their 2.0 version with 3-way merge comes out), but I'm not nearly motivated enough to hack around in the git source yet.

Double Shot #303

Yesterday's fun was getting started with cucumber, as some of the links below will tell you.

Double Shot #302

Another contribution to the Rails Guides project: Layouts and Rendering in Rails.

Double Shot #301

I seem to be hanging out in #rubyonrails on IRC these days...mikeg1a if you're hunting for me there.

Double Shot #298

Early mornings are the most peaceful time around here. Which may explain why I'm awake at 4AM.

  • CouchDB with Rails - The latest screencast from PeepCode. CouchDB has been on my radar for a long time but I haven't had a good excuse to use it yet.

  • Reminder Tests - Dan Manges suggest some novel uses for automated tests. Well, novel to me, anyhow.

  • Cucumber - Plain-text BDD tool that's an alternative to RSpec stories.

  • turled - The "look up Twitter users' web sites fast" script has turned into a whole site, complete with my Ubiquity command.

Double Shot #297

I think the ActiveRecord Associations Guide I wrote may actually be finished.

  • Dynamic Rails Error Help - Making the default validation messages more useful with a bit of javascript.

  • Exceptional - This online error-tracker for Rails apps is now in open beta.

  • Is Your Rails Application Safe? - If you're inadvertently allowing mass assignment, probably not.

  • MysqlTableSyncer - Command-line tool to synch up two MySQL tables.

  • turl - My contribution to a little scripting fest on Twitter yesterday. If you have FF3 + Ubiquity, you can use "turl <userid>" to go straight to a Twitter user's web site.

Double Shot #295

Well, I think I can add "setting up cruisecontrol.rb" to my accomplishments - though really, that's not so hard.

  • Using Single Table Inheritance is OK - A counterpoint to some of the Rails advice I pointed to yesterday.

  • GeekTool 2.1.2 - Pipe system output to your OS X desktop. I played with this for showing the log of a running Rails app, but I generally don't have any desktop visible.

  • Espresso - The folks behind CSSEdit are coming out with a full web development app. This could be hot.

  • Analyzing your GMail History - With a combination of OS X and Ruby.

Double Shot #294

Looks like I'm editing on the Rails Guides now. That's what I get for opening my big mouth.

Double Shot #293

My latest plugin noodling around: db_populate. Yeah, there are a bunch of seed data bits out there; I combined the ones I liked. Unfinished, but has some potential.

Double Shot #292


  • I got through Monday OK, despite email and meetings. Now to actually get some work done for the week.

  • Awesome Fresh Rails Documentation to Enjoy - People are starting to notice the Rails Guides project. That's good.

  • IE6 hate seems to be increasing in the web circles I run in. Pushup uses javascript & CSS to suggest that people upgrade old browser. For a more aggressive approach, there's KillIE6, which tries to trick people into upgrading to IE7. (via http://gadgetopia.com/post/6551)

  • seed-fu - Another option for loading seed data into a Rails application.

  • EditorKicker - Tool to automatically pop open your editor at the right source code line when Ruby raises an exception. There's a Rails plugin for it too. (via RubyFlow)

Double Shot #291

Woot, I'm published on one of the official Rails sites now: Rails Routing from the Outside In. I feel all accomplished and stuff.

  • Lockdown - Authentication/authorization plugin for Rails the operates on a "deny by default" basis.

  • Loading Seed Data - Good discussion on the ways to get static data into a Rails app without depending on brittle migrations. I swiped some of this in an app I'm working on now.

  • db_populate - Simple Rake task to load data from Ruby files into a new database. I've forked this to make it have some verbose output.

  • EcomPages - Open source Rails shopping cart.

  • Prawn's Second Release (0.2) - Looks like this pure-Ruby PDF generation library is moving right along.

  • App Store. I'm Out. - Yep, I'm glad that I decided against investing time in writing iPhone applications. Fat, dumb, and arbitrary is no way to go through life.

  • Regular Expressions Cheat Sheet - Nicely formatted but not language-specific or comprehensive.

  • Ruby QuickRef - Includes an exhaustive Ruby-specific regex section.

  • I Dropped IE6 - Site to brag about your refusal to support obsolete browsers.

Double Shot #290

With a CI server set up, now I'm feeling pressured to sort out the tests in a bunch of projects. Ah, progress.

  • Ruby on Rails Jobs - Another Rails job board. Some day I'll try to run up a complete list.

  • The Googlebot and Subscription Sites - Changing your user agent can get you into sites like Experts Exchange, which are otherwise so annoying in the Google search results (personally, I just block them from appearing).

Double Shot #289

The current fun: Setting up CruiseControl.rb with git and rspec.

Double Shot #288

Looks like I may actually have enough work for the end of the year. But don't let that stop you asking for more.

  • Merb Beginner's Tutorial - Notes on how to instal the latest edge bits.

  • Bort - A Base Rails Application - A shot at packaging all the "I always do this stuff" bits into a fresh Rails application. I've seen some of these before; the general issues are that my stuff doesn't match your stuff, and they haven't tracked Rails versions. But this one got enough immediate traction it might do better.

  • Ruby Wrapper for Twitter Search API - Just in case you need such a thing.

subscribe via RSS