How do I fix "remote: fatal error in commit_refs" errors trying to push with Git?

When I try to push to master branch that is hosted on https://github.com I get: remote: fatal error in commit_refs How can I solve this?