Last active
June 12, 2019 19:51
-
-
Save jcaromiq/0947dc8ddbdd9a764f779477396da176 to your computer and use it in GitHub Desktop.
Git tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#GIT Para ver los cambios que tenemos en los commits pendientes de subir: | |
git log origin/[master o branch]..HEAD | |
git diff origin/[master o branch]..HEAD | |
Ej: git diff origin/feature/featureA..HEAD | |
Ej: git diff origin/master..HEAD | |
#Purgar las ramas locales que ya no existan en remoto | |
git remote update origin --prune | |
#Merge para cuando la cosa se pone fea | |
git merge -s resolve RAMA | |
#Si queremos quedarnos con el theirs en un merge | |
git checkout --theirs filename | |
#Si queremos quedarnos con el ours en un merge | |
git checkout --ours filename | |
#rebase interactivo a partir de un commit | |
git rebase -i 97c9d7d | |
#Cambiar el comment del ultimo commmit | |
git commit --amend | |
#Eliminar ficheros (.idea) que ya han sido commiteados | |
git rm -r --cache .idea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment