I have developed a habit of pushing to the origin after each commit. Most of my commits are rather trivial, in the sense that I commit after making small changes. Is it a good practice?
I am under the impression that pushing after each small commit increases the size of repository compared to pushing after making several commits. Is this understanding wrong?
In my opinion, you should not push every commit to the origin. Instead, use interactive rebasing when you finish working with a feature to squash the smaller commits, and push the feature as one commit to the origin. But there’s not definite answer for this – googling for “git workflow” will give you several options.
Wrong. But if you rebase before pushing, then the squashed commits won’t end up in the origin.