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

Question

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?

Answer

In my case, GitHub was down by the time I was trying to push.

Just check https://www.githubstatus.com to know about GitHub site status.

When it's up you'll be able to push.

pip install from git repo branch

How do I add Git submodule to a sub-directory?