I use GIT for versioning projects I'm working on. I was able to use it to find a tricky bug today by hopping through commits.

It's pretty much the first time I've done that.

The bug was some PHP code that looks like this:

else
{
    echo somefunction($var); } ?>
}
<td><?php

I looked at the HTML where the } were showing up, which was way at the top. (The jQuery DataTable additions pushed it even further away.) Which was way away from where it actually was. I thought it might be in the jQuery but had no luck after turning off a few of the included scripts.

I decided to track it down by hopping through commits, and found it after the second try. It feels good to have tools that help you fix things. Don't code without versioning!

Comments on this page are closed.