We fear undocumented change
I love revision control. I love the ability to track changes over time, whether that be to see why I changed something in the past, or to see why a particular thing has stopped working, or to see if a particular thing is fixed in a more recent version than the one I’m using.
However I have a few opinions about the use of revision control that are obviously not shared by other people. Here are a few of them:
-
One change per changeset.
The only argument I can see against this is laziness. Changesets are cheap. Checking in multiple things in a single go makes it hard to work out exactly which piece of code fixes which problem. I’m fine with a big initial drops of code if logically it all needs to go together, but changesets that bundle up half a dozen different fixes piss me off.
-
Descriptive changeset comments.
Don’t make me guess what you changed. Tell me. Bug numbers are not sufficient (though including them is really helpful).
-
Comments in the changeset, not per file.
I’ve only seen this with BitKeeper; you can have per file comments and then an overall changeset comment. At first I thought this was quite neat, because you can explain each part of a change. Now it just annoys me, because I want the relevant detail in one place rather than having to drill down to a per file level to figure out what’s going on.
-
The tree should always compile.
There are people I respect who are all for checking in all the time throughout development no matter what the status. I have to disagree, at least for anything that’s available to other people. The tree should always compile. This avoids pissing off your coworkers (especially if they’re in a different timezone) and means you can do things like git bisect more easily. Plus it shows you’ve at least done minimal testing.
-
Don’t hide your tree.
I like centralised locations for master trees. It means I can make an educated guess about where to look first for information about changes. Trees that live in obscure network shares or, worse, someone’s home directory aren’t helpful. While I may not always agree with the choice of VCS for the centralised service as long as it’s actually fit for purpose I think it makes much more sense to use it than go off on a separate path that’s less obvious for others to find.