Commit per-change instead of per-file.
This has following advantages:
- You can later see why this single line has been changed in this exact file (aha, this was bugfix for bug #123). If you commit per-file then commit messages tend to describe changes done in file - which you can see with diff anyway. If you commit per-change then commit messages tend to explain why the change has been done in the first place.
- It is much easier to revert or merge changes/bugfixes.
- It helps to organize your work better as you clearly focus on a single bug/feature/change you are working. You commit when you are done.
Some people think this policy produces more commits but from my experience you get less commits after all. For example, you are doing refactoring which affects 50 files. After refactoring you have a single commit with a message "Refactored xyz subsystem.".
For bigger changes you should consider dev-branch-per-change policy.