Skip to content

Instantly share code, notes, and snippets.

@SoyDiego
Last active January 6, 2022 11:48
Show Gist options
  • Save SoyDiego/77cdf8571685feefab9ac939e834befe to your computer and use it in GitHub Desktop.
Save SoyDiego/77cdf8571685feefab9ac939e834befe to your computer and use it in GitHub Desktop.
Algunos GitHub Tips

Comandos GitHub

Borrar de GitHub un commit ya subido ('pusheado').

git reset --hard 'COMMIT AL QUE QUEREMOS VOLVER`  
git push --force

Ver los LOGS en una sola línea.

git log --oneline

Crear un PR (Pull Request)

  • Primero actualizamos nuestros archivos locales del repositorio remoto:
git pull origin [nombre de la rama]
  • Creamos una rama nueva y nos movemos hacia ella:
git checkout -b fix/Modified-Margin-Button
  • Agregamos los archivos modificados:
git add archivoModificado.jsx

o si son varios archivos

git add .
  • Hacemos commit:
git commit -m "fix(Button): Modified margin button"
  • Lo envíamos:
git push origin fix/Modified-Margin-Button
  • Una vez enviado, nos vamos al repositorio y en la parte superior estará un mensaje con un botón verde. Lo presionamos, completamos la info y volvemos a presionar el boton del final.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment