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

Erro ao execultar git push

Estou tentando subir um projeto que criei no git, porem quando realizo o git push "link.git", ele me apresenta este erro:

$ git push https://github.com/GuilhermeFogo/Site_sorteio.git master To https://github.com/GuilhermeFogo/Site_sorteio.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/GuilhermeFogo/Site_sorteio.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.

3 respostas

Bom dia Guilherme. Dá um Git pull antes

O repositório contem nada , acabei de fazer:

$ git pull https://github.com/GuilhermeFogo/Site_sorteio.git From https://github.com/GuilhermeFogo/Site_sorteio

  • branch HEAD -> FETCH_HEAD fatal: refusing to merge unrelated histories
solução!

Obrigado Guilherme Romão pelo auxilio, eu consegui resolver o problema : dando o comando :

git push link.git master -f

resultado:

$ git push teste master -f Counting objects: 59, done. Delta compression using up to 4 threads. Compressing objects: 100% (50/50), done. Writing objects: 100% (59/59), 9.59 KiB | 701.00 KiB/s, done. Total 59 (delta 17), reused 0 (delta 0) remote: Resolving deltas: 100% (17/17), done. To https://github.com/GuilhermeFogo/Site_sorteio.git

  • a1ea895...2bd625c master -> master (forced update)

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software