Frequency of commits
Adding files and committing changes to Git is cheap. What happens if you made some great work during the day and, at 5 pm when you were tired you made some bad changes. How can you go back to the state that was 5 minutes ago?
- Commit after adding a new function.
- Commit after writing a new test case.
- Commit after making any small change.
- Commits are cheap and fast.