by abhinav22 · 5y ago · 0 comments
At some point I got addicted to the number, so from time to time I try to manually increase my frequency of commits.
All that said, I end up doing more commits when working on front end stuff, when I doing back end programming, I am not at all interested in saving / committing frequently as I’m focused on the task at hand. With front end stuff, you necessarily need to save and refresh the webpage in your development browser, so it goes hand in hand with increasing my commits :-)
For me, commits of work in progress are only done on my development branches before I want to push to a remote to save my work in case of my computer failing (or getting lost/stolen, whatever force majeure), I usually write a "WIP: <what's been worked on>" message that I will squash later on when I have a meaningful commit.
You can commit every single character if you in the mood. At the end, when your new feature is complete, you just squash all commits in this branch to one single commit ("add feature xyz") and merge/rebase it to your main dev branch.
Now it is really easy to identify the actual code behind a new feature.