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:
Find the offending commit with git log or git log -p, not the revision number prior to the catastrophic change.
View the file at that point in time with git show SHA-ID:path/to/file
Replace current copy with git show SHA-ID:path/to/file > path/to/file
Verify the damage has been undone with git diff
Commit
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.
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.
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.
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: