Je suis coincé dans ce code. Après git fetch j'ai rencontré un mur et je ne sais pas quelle prochaine étape dois-je faire pour obtenir tous mes fichiers validés sur le serveur GitHub - maintenant il n'y a qu'un seul fichier README.md qui a été créé automatiquement lors de la sauvegarde d'un nouveau dépôt. Merci pour l'aide.GitBash | maître d'origine - rejeté (chercher d'abord) | pas de fichier dans le dépôt GitHub
Freeware [email protected] MINGW64 ~/Desktop/Coding Staff/MustBeDone (master)
$ git status
On branch master
nothing to commit, working tree clean
Freeware [email protected] MINGW64 ~/Desktop/Coding Staff/MustBeDone (master)
$ git remote add origin https://github.com/adambugaj/Lets-code.git
Freeware [email protected] MINGW64 ~/Desktop/Coding Staff/MustBeDone (master)
$ git push -u origin master
To https://github.com/adambugaj/Lets-code.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/adambugaj/Lets-code.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Freeware [email protected] MINGW64 ~/Desktop/Coding Staff/MustBeDone (master)
$ git fetch origin master
warning: no common commits
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/adambugaj/Lets-code
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
Le duplicata possible de [git: les mises à jour ont été rejetées car la télécommande contient du travail que vous n'avez pas localement] (https://stackoverflow.com/questions/24357108/git-updates-were-rejected-because-the-remote-contains-work-that-do-not-have) – phd