I think the number of commits is not a good measure for a developer. Source code should have committed when it should have a requirement to commit since lots of commits make repository more complex. According to my opinion, you should do a commit for a code change with a well-defined set of requirement. If you need to save your change on a git branch, instead of a commit, amend it to the previous commit. Another thing is that commit is not the only dimension to measure the productivity of a developer. It also includes code reviews and issue reporting.