Skip to content

Instantly share code, notes, and snippets.

@mariogrieco
Forked from luismayta/comandos git.txt
Created April 27, 2020 03:07
Show Gist options
  • Select an option

  • Save mariogrieco/f9ca4df7b2fb008c3da38dc710c7b114 to your computer and use it in GitHub Desktop.

Select an option

Save mariogrieco/f9ca4df7b2fb008c3da38dc710c7b114 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment