First, thanks for sharing @rachelsoderberg
Just came down here to write the same, I consider commits as the good old video game checkpoints.
Every time you hit a "safe place" where you would like to go back in case of something goes wrong, add a commit with a very descriptive message.
Your "future myself" (and code reviewers) will thank you a lot.
Further reading: pauline-vos.nl/atomic-commits/
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.