Pourquoi est-ce que je vois un message d'erreur en tapant git remote add
?
$ git remote add origin remote repository https://github.com/hashanmalawana/Loginsystem.git
usage: git remote add [<options>] <name> <url>
-f, --fetch fetch the remote branches
--tags import all tags and associated objects when fetching
or do not fetch any tag at all (--no-tags)
-t, --track <branch> branch(es) to track
-m, --master <branch>
master branch
--mirror[=<push|fetch>]
set up remote as a mirror to push to or fetch from
Réponses:
1 pour la réponse № 1Vous devriez taper:
git remote add origin https://github.com/hashanmalawana/Loginsystem.git
ne pas
git remote add origin remote repository https://github.com/hashanmalawana/Loginsystem.git
^^^^^^^^^^^^^^^^^^
De cette façon, vous ajoutez une télécommande nommée origin
, référençant le repo distant https://github.com/hashanmalawana/Loginsystem.git
Et vous ne verrez pas le message d'utilisation
usage: git remote add [<options>] <name> <url>
Je comprends que l’étape 8 de "Ajouter un projet existant à GitHub en utilisant la ligne de commande"peut être déroutant:
git remote add origin remote repository URL
Mais les trois derniers paramètres ne sont en réalité qu'un seul. Il devrait lire:
git remote add origin <remote repository URL>
Il vaut mieux se référer à la page de manuel réelle pour git remote
git remote add <name> <url>