- Write meaningful and concise commit message:
- ❌ "Add new feature"
- ✅ Changing X and Y because of Z
- Follow a pattern / convention for commit messages. You can check a good reference here.
- Squash commits you did for testing / adding small changes. You can check how to do that here.
- Separate your commits into isolated units of "atomic" changes. Examples:
- Changes in one class / file
- Refactor previous to the actual change you'll be doing
- Changes in one function if the change is considerable