Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

erro: failed to push some refs to 'github...git'

Tive o seguinte erro quando fui usar o : git push -u origin main,
não consegui entender o que foi feito de errado. Alguém pra dar um help?

To github.com:XXXXXXX/jogo-do-numero-secreto.git
! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to 'github.com:XXXXXX/jogo-do-numero-secreto.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

2 respostas
solução!

A sua branch local está atrás da sua branch remota. Ou seja, a sua branch local está desatualizada.

Utilize esse comando para atualizar a sua branch: git pull origin main --rebase
Depois utilize esse comando para mandar suas atualização para a branch remota: git push -u origin main

Deu certo! Obrigadooo!