Git · Junior · Question 46 of 75
What is the main idea of small, focused commits?
- ✓Correct answer: Each commit does one thing, easy to review and revert
- 2Every file has to be committed in a separate commit
- 3Commits must stay below a fixed number of lines
Explanation
Mixing a refactor, a bug fix and formatting in one commit makes review hard and turns a targeted revert into a big mess.