Skip to content

Instantly share code, notes, and snippets.

@luismayta
Created November 9, 2012 19:43
Show Gist options
  • Save luismayta/4047768 to your computer and use it in GitHub Desktop.
Save luismayta/4047768 to your computer and use it in GitHub Desktop.
Comandos de Git
listar los branch
git branch -l
listar branch remotes
git branch -r
eliminar un branch local
git branch -d <branch>
eliminar un branch remoto
git push <remote> :<branch>
ver diferencias entre branch
git diff <branch> <branch>
ver solamente los archivos diferentes
git diff <branch> <branch> --name-only
ver las diferencias entre branch de un archivo
git diff <branch> <branch> <archivo>
ver las diferencias de un archivo entre hash de un commit
git diff <hash_commit> <hash_commit> <file>
listar los branch que han sido unidos(merge)
git branch --merged
listar los branch que no han sido unidos(merge)
git branch --no-merged
eliminar un commit
git reset HEAD~1
crear alias
git config --global alias.ck checkout
git config --global alias.last 'log -1 HEAD'
git config --global alias.visual "!gitk"
Changing Your Last Commit
git commit --amend
create key ssh
ssh-keygen -t rsa -C "your_email@youremail.com"
@CodeBAou
Copy link

CodeBAou commented Sep 17, 2020

tienes una errata en la linea 10 y 11
eliminar un branch remoto
git push remote branch

"Este comando es para enviar contenido de local a remoto no para eliminarlo"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment