I faced the same problem, and I used --allow-empty
:
$ git commit -m "initial commit" --allow-empty
...
$ git push
...
Supplement
One of main reasons of this problem is that some Git servers, such as BitBucket, don't have their master
branch initialized when a fresh repository is cloned.