Repository files navigation
Iniciamos git git init
Chequeamos el estado con git status
Agregamos al Staging area con git add <file>
Hacemos commit con git commit -m "<mensaje>"
Revisamos el log de commits con git log
git remote add origin <url> agregamos un nuevo repositorio remoto
git push -u origin main
git pull origin main
git remote -v verificar origen del repo
git remote set-url origin <https://github.com/USERNAME/REPOSITORY.git> cambiar origen del repo
git fetch origin otenemos las branches del repo
git branch -a lista de las branches
git checkout -b <branch> origin/<branch> cambiamos de branch
git reset HEAD~1 Para cancelar un commit que no vamos sincronizar con el remoto, para unix usamos HEAD^
CUando hay problemas con "No same histories"
git pull origin <main-branch> --allow-unrelated-histories permitimos que el branch Main permita las urelated histories.
git push origin <local-branch> hecemos el push para subir los cambios.
En github.com ya podemos realizar el PullRequest y luego hacer el Merge.
About
Basic Comands
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.