Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
clase:daw:daw:2eval:tema06 [2023/04/06 11:36] admin [Merge] |
clase:daw:daw:2eval:tema06 [2025/04/13 10:37] (actual) admin [6. Control de Versiones Avanzado] |
||
---|---|---|---|
Línea 6: | Línea 6: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
Línea 54: | Línea 55: | ||
git branch nuevaRama | git branch nuevaRama | ||
git switch nuevaRama | git switch nuevaRama | ||
- | git push -u origin nuevaRama | + | |
+ | | ||
</ | </ | ||
Línea 77: | Línea 79: | ||
<sxh bash> | <sxh bash> | ||
- | git branch -d miRama | ||
git branch --delete miRama | git branch --delete miRama | ||
+ | git branch -d miRama | ||
</ | </ | ||
Línea 87: | Línea 89: | ||
<sxh bash> | <sxh bash> | ||
- | git branch -d -f miRama | ||
git branch --delete --force miRama | git branch --delete --force miRama | ||
+ | git branch -d -f miRama | ||
git branch -D | git branch -D | ||
</ | </ | ||
Línea 523: | Línea 525: | ||
\\ | \\ | ||
- | ===== Stash ===== | ||
- | Hay veces que queremos guardar temporalmente los cambios para despues volver a ellos, por ejemplo si queremos cambiar de rama. | ||
- | |||
- | git contiene una orden para hacer eso: | ||
- | <sxh bash> | ||
- | git stash | ||
- | </ | ||
- | |||
- | Y si luego queremos recuperar los cambios se hace con: | ||
- | |||
- | <sxh bash> | ||
- | git stash pop | ||
- | </ | ||
===== Recetas ===== | ===== Recetas ===== | ||
Línea 558: | Línea 547: | ||
+ | * Proceso completo para hacer una modificacion en la propia rama y ponerla en develop | ||
+ | <sxh bash> | ||
+ | #Día 1:Lunes | ||
+ | git fetch --prune && git switch develop && git merge --ff-only origin/ | ||
+ | git branch lorenzo_45 | ||
+ | git switch lorenzo_45 | ||
+ | git push --set-upstream origin lorenzo_45 | ||
+ | git commit -m " | ||
+ | git commit -m " | ||
+ | git push | ||
+ | |||
+ | #Día 2:Martes | ||
+ | git fetch --prune && git switch develop && git merge --ff-only origin/ | ||
+ | git switch lorenzo_45 | ||
+ | git merge develop | ||
+ | git commit -m " | ||
+ | git commit -m " | ||
+ | git commit -m " | ||
+ | git push | ||
+ | |||
+ | #Día 3:Miercoles | ||
+ | git fetch --prune && git switch develop && git merge --ff-only origin/ | ||
+ | git switch lorenzo_45 | ||
+ | git merge develop | ||
+ | git commit -m " | ||
+ | git commit -m " | ||
+ | git commit -m " | ||
+ | git push | ||
+ | |||
+ | |||
+ | #Día 4: Jueves | ||
+ | git fetch --prune && git switch develop && git merge --ff-only origin/ | ||
+ | git switch lorenzo_45 | ||
+ | git merge develop | ||
+ | git commit -m " | ||
+ | git commit -m " | ||
+ | git commit -m " | ||
+ | git push | ||
+ | |||
+ | |||
+ | #Día 5: Viernes | ||
+ | git fetch --prune && git switch develop && git merge --ff-only origin/ | ||
+ | git switch lorenzo_45 | ||
+ | git merge develop | ||
+ | |||
+ | git switch develop | ||
+ | git merge --squash lorenzo_45 | ||
+ | git commit -am " | ||
+ | git push | ||
+ | #Si falla el push hacer el fetch y rebase | ||
+ | git fetch --prune | ||
+ | git rebase origin/ | ||
+ | git push | ||
+ | |||
+ | git push origin --delete lorenzo_45 | ||
+ | git branch --delete --force lorenzo_45 | ||
+ | |||
+ | </ | ||