I have a local git repo with many commits. I created an empty repo in github (not initialized with any files).
$ git remote add origin https://github.com/bar/foo.git
$ git push -u origin master
Counting objects: 35, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (35/35), 1.95 KiB | 0 bytes/s, done.
Total 35 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), done.
remote: bar/foo
remote: fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
remote: Use '--' to separate paths from revisions, like this:
remote: 'git <command> [<revision>...] -- [<file>...]'
remote: master
To https://github.com/bar/foo.git
* [new branch] master -> master
My changes are in remote and things seem to have worked fine. Still, why do I get a "fatal" error ?
remote: fatal: ambiguous argument 'master': unknown revision or path not in the the working tree.