Friday, June 17, 2016

Compare before every check-in

If you don't compare every file before you check-in, you are more likely to check something in that was only needed for testing the change. (or something that was you trying to figure out how to solve the problem, and is now dead code) Additionally, If you do compare every file, you get to see what a diff program (and another human would see) when trying to compare the before to after. You can then optimize the code so that a diff is far more readable (if only for that check-in, then check-in again if you desire a specific order for how the file should read). Version Control Systems that have easy staging of parts of a file instead of all changes can make this even easier. Since, you may want to keep your local changes for testing, without checking them in for more testing or more feature additions. (or even permanent testing additions for your local workspace)