Can't make first git commit to the remote rep

Viewed 524

I've got a strange problem: tried to make a new repository, as usual, followed instructions from github:

  1. git init
  2. git add .
  3. git commit -m "first commit"
  4. git remote add origin https://github.com/*/**.git
  5. git push -u origin master

My problem occures at the 3rd step:

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' "Branch could not be empty."

What's the matter? I didn't have such problem until now. Tried to reinit git by deleting the folder and typing new "git init" command - the problem still the same.

p.s.: the full way of making repository I've passed: got to the github.com, clicked on the button "New" (repository), added a name for it (the same as a folder on PC) and started to do some magic via cmder (following the instructions from github) ...

p.p.s.: I use windows 10 and cmder (tried gitBash too).

upd: there's something in my windows environment, 'cause on another machine everything's fine.

1 Answers
Related