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

Erro ao enviar arquivo para o repositório remoto.

Acabei de criar um novo repositório no GitHub, seu nome é Cursos-HTML-CSS-JS_Caelum, após sua criação copiei seu link no caso: https://github.com/RodrigoFranco91/Cursos-HTML-CSS-JS_Caelum.git

No git eu realizei os seguintes comandos:

1º git remote add origin-caelum https://github.com/RodrigoFranco91/Cursos-HTML-CSS-JS_Caelum.git

2º git push origin-caelum

3º Digitei meu login e senha

Após digitar a senha a seguinte mensagem é exibida:

To https://github.com/RodrigoFranco91/Cursos-HTML-CSS-JS_Caelum.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/RodrigoFranco91/Cursos-HT ML-CSS-JS_Caelum.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.

Cheguei até assistir novamente a aula cujo o instrutor ensina a criar o repositório remoto e realizar o push e não consegui achar o que estou fazendo de errado. Gostaria que alguém me ajudasse. Desde já agradeço a atenção de todos.

2 respostas
solução!

Oi Rodrigo,

O estado da sua branch não é o mesmo da que está no github, você precisa sincronizar com git pull e depois rodar git push novamente.

abraços

Muito obrigado Felipe, era isso mesmo. Acho que por eu ter criado aquele arquivo README pelo github eu perdi a sincronização né, pois o repositório era novo... Muito obrigado.

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