I've been using Git now for a while. Initially all through a GUI, meanwhile proficient enough to do the standard tasks from the command prompt.
That said I'm still unsure what "the world out there" considers to be good commit practice. I'm struggling with what I would described as modular commits vs. logical commits.
To illustrate: say I change something that i.e. adds another SELECT CASE (that's SWITCH in C) case and code to handle it in two different methods. Let's say the number of changed files here involves 3: a header where a new THIS_NEW_CASE constant is defined. And 2 physical files in which the above mentioned 2 methods reside.
So, what do I commit then? All three files in one commit (=logical commit). Or each of the three file in a separate commit (=modular commit)?
I recon that there might not be one silver bullet. But I'm confident that in general there's a preferred way to commit.