Pourquoi “git push helloworld +master:master” au lieu de “git push helloworld”?

J'ai essayé de pousser ma (première!) repo git comme ça d'abord:

$ git push helloworld

Mais j'ai eu ce retour:

To [email protected]:helloworld.git
 ! [rejected]        HEAD -> master (non-fast forward) error:
 failed to push some refs to '[email protected]:helloworld
git'

J'ai donc trouvé une autre question StackOverflow sur "modifié s'engage" et essayé de faire une suggestion à partir de là sans vraiment savoir si on pourrait m'aider:

KaiserSosa@SMICHAELS /c/test/helloworld (master)
$ git push helloworld +master:master

Il a travaillé!

Mais je ne sais pas pourquoi il a fixé mon problème 🙁

Quelqu'un pourrait-il expliquer pourquoi cela fonctionne, mais "git push helloworld" ne l'est pas?

A ajouté une autre solution, en réponse à votre commentaire.

OriginalL'auteur S. Michaels | 2009-09-25