A cautionary tale of Git and Virtualbox

I have been trying to keep the code chops sharp since work doesn’t require it very often anymore, usually by working on polishing up projects I’ve started in the past but let fall by the wayside.  Last night was a bugfix session on imgur2pdf which I have been neglecting for a while now and specifically working on the resizing logic which was hosed up and created some ugly PDFs.  All told I think I spent about two and a half hours working on the code testing it over and over with galleries to make sure sizes were right and it made changes as appropriate to large dimension images.  Once I got things right to where I wanted them I pushed my commit up to the repo and took a break for a while, grabbing some tea and having a look at why the virtualbox VM I was working on wasn’t letting me copy/paste between it and my parent OS.

Some quick poking around and I realized I hadn’t installed the Guest Additions software so I loaded that up and rebooted the VM only to be graced with a solid black screen that was unresponsive. I rebuild the VM since it was mostly empty and try it a second time and the exact same thing happens when rebooting after installing.  Asked around on IRC and a buddy pointed out to me that this is kind of a known issue and there is a potential fix out for it, so I guess I know what I am doing with my evening tonight.

Thinking about this today made me realize that the old way of doing code would have probably cost me several hours of work and resulted in a great deal of profanity had I wiped out everything.  So let this be a lesson to anybody just getting started with Git, commit/push often as it beats the alternative of losing hours of work

Leave a Comment