Herramientas de usuario

Herramientas del sitio


clase:daw:daw:2eval:tema06

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

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://learngitbranching.js.org/|Git Branching: Aprender Jugando con ramas en Git]]: Permite probar Git con ejemplos interactivos   * [[https://learngitbranching.js.org/|Git Branching: Aprender Jugando con ramas en Git]]: Permite probar Git con ejemplos interactivos
   * [[https://www.youtube.com/watch?v=mxoSIF-Qm7g|17 Ways to Undo Mistakes with Git]]   * [[https://www.youtube.com/watch?v=mxoSIF-Qm7g|17 Ways to Undo Mistakes with Git]]
 +  * [[https://craftquest.io/guides/git/how-git-works/the-plumbing|The Plumbing Guide]]: Comandos de bajo nivel de Git
  
  
Línea 54: Línea 55:
   git branch nuevaRama   git branch nuevaRama
   git switch nuevaRama   git switch nuevaRama
-  git push -u origin nuevaRama+  git push --set-upstream origin nuevaRama 
 +  git push -u             origin nuevaRama
  
 </sxh> </sxh>
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
 </sxh> </sxh>
  
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         miRama   git branch -D         miRama
 </sxh> </sxh>
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 
-</sxh> 
- 
-Y si luego queremos recuperar los cambios se hace con: 
- 
-<sxh bash> 
-git stash pop 
-</sxh> 
  
 ===== 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/develop && git switch release && git merge --ff-only origin/release && git switch master && git merge --ff-only origin/master && git switch develop
 +git branch lorenzo_45
 +git switch lorenzo_45
 +git push --set-upstream origin lorenzo_45
 +git commit -m "micro-commit-dia-1-a"
 +git commit -m "micro-commit-dia-1-b"
 +git push
 +
 +#Día 2:Martes
 +git fetch --prune && git switch develop && git merge --ff-only origin/develop && git switch release && git merge --ff-only origin/release && git switch master && git merge --ff-only origin/master && git switch develop
 +git switch lorenzo_45
 +git merge develop
 +git commit -m "micro-commit-dia-2-a"
 +git commit -m "micro-commit-dia-2-b"
 +git commit -m "micro-commit-dia-2-c"
 +git push
 +
 +#Día 3:Miercoles
 +git fetch --prune && git switch develop && git merge --ff-only origin/develop && git switch release && git merge --ff-only origin/release && git switch master && git merge --ff-only origin/master && git switch develop
 +git switch lorenzo_45
 +git merge develop
 +git commit -m "micro-commit-dia-3-a"
 +git commit -m "micro-commit-dia-3-b"
 +git commit -m "micro-commit-dia-3-c"
 +git push
 +
 +
 +#Día 4: Jueves
 +git fetch --prune && git switch develop && git merge --ff-only origin/develop && git switch release && git merge --ff-only origin/release && git switch master && git merge --ff-only origin/master && git switch develop
 +git switch lorenzo_45
 +git merge develop
 +git commit -m "micro-commit-dia-4-a"
 +git commit -m "micro-commit-dia-4-b"
 +git commit -m "micro-commit-dia-4-c"
 +git push
 +
 +
 +#Día 5: Viernes
 +git fetch --prune && git switch develop && git merge --ff-only origin/develop && git switch release && git merge --ff-only origin/release && git switch master && git merge --ff-only origin/master && git switch develop
 +git switch lorenzo_45
 +git merge develop
 +
 +git switch develop
 +git merge --squash lorenzo_45
 +git commit -am "feat(#45):Crear la pantalla de login"
 +git push
 +#Si falla el push hacer el fetch y rebase
 +git fetch --prune 
 +git rebase origin/develop
 +git push 
 +
 +git push origin --delete lorenzo_45
 +git branch --delete --force lorenzo_45
 +
 +</sxh>
  
  
clase/daw/daw/2eval/tema06.1680773810.txt.gz · Última modificación: 2023/04/06 11:36 por admin