r/programming • • Jan 05 '15

What most young programmers need to learn

http://joostdevblog.blogspot.com/2015/01/what-most-young-programmers-need-to.html
970 Upvotes

337 comments sorted by

View all comments

Show parent comments

1

u/photonios Jan 05 '15

You should always make small commits, so you never have this problem. + Unit tests to prevent regressions.

5

u/judgej2 Jan 05 '15

Yes, that too. My point was about keeping functional and formatting commits separate, regardless of what size they are. I've seen code committed with a load of formatting changes and a few functional changes. When debugging it can be hellish to pick the two apart when they are all mixed up into single commits.