Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problemas con git #11

Open
Jesicapaz89 opened this issue Mar 2, 2023 · 1 comment
Open

problemas con git #11

Jesicapaz89 opened this issue Mar 2, 2023 · 1 comment

Comments

@Jesicapaz89
Copy link
Collaborator

@lidefi87 tengo un problema queriendo subir archivos a github. Seguro es algo que cambié y ya no puedo volver para atrás. Sucede que quise cargar varias cosas desde la terminar del r de mi compu y no me dejó (según el error era por un tema de pesos de archivos). ahora quiero subir un archivo separado de texto para seguir practicando y aparece esto :

Jesica@LAPTOP-0TUN3040 MINGW64 /g/hackaton/jesihakaton/proy5-regiones-comparacion (main)
$ git add textoprueba3.txt

Jesica@LAPTOP-0TUN3040 MINGW64 /g/hackaton/jesihakaton/proy5-regiones-comparacion (main)
$ git status
On branch main
Changes to be committed:
(use "git restore --staged ..." to unstage)
new file: textoprueba3.txt

Jesica@LAPTOP-0TUN3040 MINGW64 /g/hackaton/jesihakaton/proy5-regiones-comparacion (main)
$ git commit -m "agrego texto3"
[main 43a46bf] agrego texto3
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 textoprueba3.txt

Jesica@LAPTOP-0TUN3040 MINGW64 /g/hackaton/jesihakaton/proy5-regiones-comparacion (main)
$ git push
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin main

To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.

Jesica@LAPTOP-0TUN3040 MINGW64 /g/hackaton/jesihakaton/proy5-regiones-comparacion (main)
$ git push --set-upstream origin main
To https://github.com/Intercoonecta/proy5-regiones-comparacion.git
! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/Intercoonecta/proy5-regiones-comparacion.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.

Ya no puedo subir nada!!

@lidefi87
Copy link
Collaborator

lidefi87 commented Mar 2, 2023

Al parecer alguien hizo cambios antes que tú, entonces existen conflictos entre la versión en tu computador y en la de GitHub. Lo que debemos hacer es un git pull para actualizar la versión local. Luego debemos verificar los archivos en los que existen conflictos y verificar los cambios que quisieras mantener.

Puedes identificar las áreas de conflicto porque están entre las líneas:

<<<<<<HEAD
version 1
=======
version 2
>>>>>>código de identificación de commit

Puedes referirte a esta guía para más información de cómo resolver este problema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants