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 [2022/12/07 12:51]
admin
clase:daw:daw:2eval:tema06 [2024/01/02 10:07] (actual)
admin [Usando Ramas]
Línea 14: Línea 14:
 {{:clase:daw:daw:1eval:git-flow.png?600|}} {{:clase:daw:daw:1eval:git-flow.png?600|}}
  
 +{{:clase:daw:daw:2eval:drinkinggame.jpg|}}
  
 Ejemplo de Ramas Ejemplo de Ramas
Línea 53: Línea 54:
   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 124: Línea 126:
  
 Se usa para poner los commits de  origin/develop en nuestra develop de antes que lo de develop porque hay commits distintos en cada rama pero del mismo commit origen Se usa para poner los commits de  origin/develop en nuestra develop de antes que lo de develop porque hay commits distintos en cada rama pero del mismo commit origen
- 
  
 {{:clase:daw:daw:2eval:rebase.png?direct|}} {{:clase:daw:daw:2eval:rebase.png?direct|}}
 +
 +
 +''git commit -m "E"''
 +<flow>
 +%%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'origin/develop','rotateCommitLabel': false}} }%%
 +gitGraph
 + commit id: "A"
 + commit id: "B"
 + branch develop
 + commit id: "E"
 +
 +
 +</flow>
  
 \\ \\
 +''git fetch --prune''
 +<flow>
 +%%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'origin/develop','rotateCommitLabel': false}} }%%
 +gitGraph
 + commit id: "A"
 + commit id: "B"
 + branch develop
 + commit id: "E"
 + checkout origin/develop
 + commit id: "C"
 + commit id: "D"
 +
 +
 +</flow>
 +
 +\\
 +'' git switch develop''
 +\\
 +''git rebase origin/develop''
 +<flow>
 +%%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'origin/develop','rotateCommitLabel': false}} }%%
 +gitGraph
 + commit id: "A"
 + commit id: "B"
 + commit id: "C"
 + commit id: "D"
 + branch develop
 + commit id: "E"
 + checkout origin/develop
 +
 +
 +</flow>
  
 ==== git merge --squash rama ==== ==== git merge --squash rama ====
Línea 147: Línea 193:
  
 \\ \\
 +
 +<flow>
 +%%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'develop','rotateCommitLabel': false}} }%%
 +gitGraph
 + commit id: "A"
 + commit id: "B"
 + commit id: "C"
 + commit id: "D"
 +</flow>
 +
 +\\
 +''git fetch --prune''
 +<flow>
 +%%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'develop','rotateCommitLabel': false}} }%%
 +gitGraph
 + commit id: "A"
 + commit id: "B"
 + commit id: "C"
 + commit id: "D"
 + branch origin/develop
 + commit id: "E"
 + commit id: "F"
 +</flow>
 +
 +
 +\\
 +''git merge --ff-only origin/develop''
 +<flow>
 +%%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'develop y origin/develop','rotateCommitLabel': false}} }%%
 +gitGraph
 + commit id: "A"
 + commit id: "B"
 + commit id: "C"
 + commit id: "D"
 + commit id: "E"
 + commit id: "F" 
 +</flow>
 +
  
 ==== git merge rama ==== ==== git merge rama ====
Línea 440: Línea 524:
 \\ \\
  
-===== 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 =====
clase/daw/daw/2eval/tema06.1670413868.txt.gz · Última modificación: 2022/12/07 12:51 por admin