I like to commit related files together, or at the very least enough so that the project compiles when someone updates. Why? Depending on your version control tool, the entire project will be versioned as well. In Perforce, for instance, checkins are assigned a changelist number. These changelist numbers also serve as revision numbers for the entire directory. By checking in individual files, the code base will not always have a valid state at each revision. By checking in related files, I can go back to other revisions, not just for one file, but the entire project, and ensure that it's at a place where it at least compiles and hopefully runs correctly.