alguien podría ayudarme a solucionar este error? intenté el comando del profe, y el un comentario (añadí -u) y aun me sale el error <code...

Pregunta de la clase:
Uso de GitHub
Maria Clara Orozco Caro

Maria Clara Orozco Caro

Pregunta
studenthace 5 años

alguien podría ayudarme a solucionar este error?

intenté el comando del profe, y el un comentario (añadí -u) y aun me sale el error

SSD M2@DESKTOP-I73933O MINGW64 /c/xampp/htdocs/git (master) $ git push origin master To https://github.com/julioh99/Blog.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/julioh99/Blog.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. SSD M2@DESKTOP-I73933O MINGW64 /c/xampp/htdocs/git (master) $ git push -u origin master To https://github.com/julioh99/Blog.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/julioh99/Blog.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
2 respuestas
para escribir tu comentario
    Pablo Aquino

    Pablo Aquino

    studenthace 5 años

    El mensaje te indica que primero debes realizar un

    git pull
    , puedes intentar con el comando que hizo Freddy.

    git pull origin master --allow-unrelated-histories

    Luego vuelves a realizar el

    git push
    .

    Manuel Ojeda

    Manuel Ojeda

    studenthace 5 años

    Cuando se hace el primer push desde tu equipo muchas veces sale mejor utilizar por única ocasión la bandera --force:

    git push origin master --force

Curso de Git y Github [Empieza Gratis]

Curso de Git y Github [Empieza Gratis]

Deja de versionar tus proyectos usando tu propio sistema de control de versiones. Mejor usa Git, el sistema de control de versiones por excelencia que utiliza la industria tecnológica. Aprende a trabajar con git, conceptos básicos, clonar un repositorio y gestionar tus proyectos alojándolos en tu repositorio local y en GitHub.

Curso de Git y Github [Empieza Gratis]
Curso de Git y Github [Empieza Gratis]

Curso de Git y Github [Empieza Gratis]

Deja de versionar tus proyectos usando tu propio sistema de control de versiones. Mejor usa Git, el sistema de control de versiones por excelencia que utiliza la industria tecnológica. Aprende a trabajar con git, conceptos básicos, clonar un repositorio y gestionar tus proyectos alojándolos en tu repositorio local y en GitHub.