How do I avoid committing small changes in git?

Viewed 6635

I'm wondering, how could I avoid a commit in really small changes of code. For instance, sometimes I miss a space between parameters or that kind of tiny code formatting. The reason I ask this is because later I have to push my commits to a remote repository and I don't want to include those small changes.

Any ideas? Thanks

4 Answers

One option is to work on a separate branch, and then squash all the commits of the branch into a single commit when you feel like you've done enough, see this question.

Related