When I try to push to master I get:
remote: fatal error in commit_refs
How can I solve this?
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.