1
resposta

Erro ao enviar para o github

Na primeira vez apareceu uma tela de login depois não apareceu mais e parace essa mensagem de erro

USER@DESKTOP-OVOJ05P MINGW64 ~/Desktop/projeto-git/wesley (main)
$ git remote add origin https://github.com/wesleyLM/projeto-git.git

USER@DESKTOP-OVOJ05P MINGW64 ~/Desktop/projeto-git/wesley (main)
$ git push origin main
To https://github.com/wesleyLM/projeto-git.git
 ! [rejected]        main -> main (fetch first)
error: failed to push some refs to 'https://github.com/wesleyLM/projeto-git.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.
1 resposta

Olá. Não sou especialista, estou fazendo o curso de Git/Github. Mas pelo que está escrito nas dicas que você apresentou, talvez a versão que você trabalhou em cima esteja diferente da que está lá no Github. Você teria que primeiro dar um "git pull origin main", fazer as alterações e depois "git push origin main".

Espero ter ajudado.