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/05 21:08]
admin [Merge]
clase:daw:daw:2eval:tema06 [2024/01/02 10:07] (actual)
admin [Usando Ramas]
Línea 54: 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 125: 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>
  
 \\ \\
-''gir fetch --prune''+''git fetch --prune''
 <flow> <flow>
 %%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'origin/develop','rotateCommitLabel': false}} }%% %%{init: { 'logLevel': 'debug', 'theme': 'default','themeVariables': {  'git0': '#6D97CA','git1': '#00ffff' }, 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'origin/develop','rotateCommitLabel': false}} }%%
Línea 138: Línea 151:
  branch develop  branch develop
  commit id: "E"  commit id: "E"
- commit id: "F" 
  checkout origin/develop  checkout origin/develop
  commit id: "C"  commit id: "C"
Línea 146: Línea 158:
 </flow> </flow>
  
 +\\
 '' git switch develop'' '' git switch develop''
 \\ \\
Línea 158: Línea 171:
  branch develop  branch develop
  commit id: "E"  commit id: "E"
- commit id: "F" 
  checkout origin/develop  checkout origin/develop
  
Línea 181: 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 474: 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.1680721687.txt.gz · Última modificación: 2023/04/05 21:08 por admin