cheat_sheet_chuleta_de_git_para_sysadmins
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
cheat_sheet_chuleta_de_git_para_sysadmins [2023/10/19 12:24] – [Deshacer acciones] busindre | cheat_sheet_chuleta_de_git_para_sysadmins [2024/05/28 21:09] (current) – [Ramas y etiquetas] busindre | ||
---|---|---|---|
Line 102: | Line 102: | ||
<code bash> | <code bash> | ||
git branch -avv # Lista todas las ramas y algunos commits. | git branch -avv # Lista todas las ramas y algunos commits. | ||
+ | git branch -r # Lista las ramas remotas (se puede usar con --merged y --no-merged) | ||
+ | git branch --merged | ||
+ | git branch --no-merged | ||
+ | |||
git branch < | git branch < | ||
git checkout < | git checkout < | ||
Line 107: | Line 111: | ||
git checkout -b < | git checkout -b < | ||
- | git branch -d < | + | git branch -d < |
- | git branch -d < | + | git branch -D < |
- | git branch -d `git branch --merged | grep -v \* | xargs` | + | git branch -d `git branch --merged | grep -v \* | xargs` |
git push origin --delete < | git push origin --delete < | ||
Line 118: | Line 122: | ||
git show < | git show < | ||
+ | </ | ||
+ | |||
+ | Eliminar varias ramas de forma simultanea | ||
+ | <code bash> | ||
+ | # Borra todas las tamas locales ya fusionadas excluyendo master y XXX. | ||
+ | git branch --merged | grep -Ev " | ||
+ | |||
+ | # Elimina | ||
+ | git branch -r --merged | grep -Ev " | ||
+ | |||
+ | # Listar y borrar ramas locales que hayan sido eliminadas en el remoto. "< | ||
+ | git remote prune < | ||
+ | git remote prune < | ||
</ | </ | ||
cheat_sheet_chuleta_de_git_para_sysadmins.1697711095.txt.gz · Last modified: 2023/10/19 12:24 by busindre