I agree with the earlier answers. If in doubt, split your changes into a few commits. If you donβt want to clutter up the change history with a lot of small changes (and your changes look like one atom change), make these changes in the side branch, where you can separate them. It is much easier to read the differences later (and be sure that nothing was accidentally broken) if each change is clear and understandable.
Do not change functionality while correcting formatting. If you change the value of the conditional expression so that a whole bunch of code can be exceeded, change the logic in one change and perform outdent in the subsequent change. And be explicit with your commit messages .
source share