In general, a good git history is one that shows evidence of incremental development.
For example, in this repo we can easily tell:
- the order in which features were added
- what bugs were fixed along the way
- if any significant refactoring was done
A good rule of thumb for a solid commit history addresses each of these points directly: you should commit when you add a new feature, fix a bug, or perform any significant refactoring.
You should also make sure your commit messages are descriptive. If you can't read your message and understand exactly what was changed, the message isn't descriptive enough.
Here's a descriptive message: implement auto vertical scrolling
Here's a vague message (which you should avoid): bug fix
To be clear, this is an example of a good git history for the purposes of this class. It's probably not ideal for a more formal environment. All we care about here is evidence of incremental development! It's not important how many commits you have, as long as they provide that evidence.
You can view the commit history by clicking the button above that looks like this: