Interesting. Mercurial handles the rename nicely ("hg rename"), but it doesn't go in and edit all the places where it's referred to. But (using PHP) the autoinclude system handles that if you use a filename that matches the pattern for the class name. The autoinclude system works out the filename from the class name. So rename the class in the source file and wherever it's invoked, rename the file, you're done. I don't use git (or C, C++) so IDK other systems.