Pluck out an old revision of a file with git show 3

Posted by Kenneth Kalmer on March 20, 2009

I was busy merging work back and forth between topic branches today and by accident miss-merged a 700-line spec. Everything else was fine (or so I hope) except this one file. I couldn’t use git revert, since that would mean I’ll have to redo all the merges I made.

So in panic I googled and read several man pages, coming to the following conclusion that worked quite well:

  1. Find the offending commit with git log or git log -p, not the revision number prior to the catastrophic change.
  2. View the file at that point in time with git show SHA-ID:path/to/file
  3. Replace current copy with git show SHA-ID:path/to/file > path/to/file
  4. Verify the damage has been undone with git diff
  5. Commit
  6. Breathe

Git is a double edged sword, it is extremely powerful and useful, but can be a real pain in the behind. I love git, and will not easily be convinced to move to something else.

ruote 0.9.20 released, and the road the ruote-kit 2

Posted by Kenneth Kalmer on March 18, 2009

Congratulations to John Mettraux for just pushing ruote 0.9.20 out the door. I’ve had the great privilege of working with John on an almost weekly basis, learning about ruote and discussing our complicated service provisioning processes with him. Recently I also presented ruote to our monthly Ruby on Beer group here in Johannesburg.

Looking forward, I’m excited to get ruote-kit going as a replacement to the current ruote-rest project. Below is a gist from Github that I’ve been using to plot my ideas for the project.

Ruote in 20 minutes 7

Posted by Kenneth Kalmer on March 04, 2009

I had the great privilege last night to do a presentation on Ruote at the third monthly Ruby on Beer meetup here in Gauteng. It ended up taking 35 minutes, not 20 as intended, but I think I got something across to the guys.

Ruote (and BPM in general) isn’t a light topic, but it is a game changer if you use it correctly. We use it here at inX to drive all our background provisioning of services (domains, hosting, emails, internet connectivity, etc) with great success. Attempting to do all those tasks with a state machine would have been futile.

Andrew Timberlake was kind enough to record a video of the presentation, I’ve published the video on this blog.

I’ll also start posting more on Ruote, as my involvement with the project grows. In the meantime, have a look at the following resources to get started:

  • Tags

    activerecord air amqp analytics audits bash bind capistrano cheat convert couchdb daemon-kit dlz dns elsewhere gentoo gist git hoptoad linux macros mercurial messaging mysql nginx olympics plugins postfix postini powerdns presentations projects quickies rails rake review ruby ruby19 ruote security shoes sitemap ssl svn webby
  • Recent Posts

  • Archives

  • Alltop. Seriously?! I got in?