From f4879e05536ecac870adffccab615d4cfbe306ad Mon Sep 17 00:00:00 2001 From: PaganoBerserker <47154857+PaganoBerserker@users.noreply.github.com> Date: Wed, 15 Feb 2023 10:14:13 -0600 Subject: [PATCH 1/2] Titulo --- gitflowCheetSheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitflowCheetSheet.md b/gitflowCheetSheet.md index e688c33..e0ebcc2 100644 --- a/gitflowCheetSheet.md +++ b/gitflowCheetSheet.md @@ -1,4 +1,4 @@ -----------------------------CURSO DE GIT Y GITFLOW-------------------------------- +# CURSO DE GIT Y GITFLOW Comandos de Git basicos o frecuentes From 834182f899b8ac3ee9d5431c12d221a8e53fa2d5 Mon Sep 17 00:00:00 2001 From: HackMD <37423+hackmd-hub[bot]@users.noreply.github.com> Date: Wed, 15 Feb 2023 18:08:05 +0000 Subject: [PATCH 2/2] Version 0.1 --- gitflowCheetSheet.md | 149 +++++++++++++++++++++++++++++++++---------- 1 file changed, 114 insertions(+), 35 deletions(-) diff --git a/gitflowCheetSheet.md b/gitflowCheetSheet.md index e0ebcc2..ef36c37 100644 --- a/gitflowCheetSheet.md +++ b/gitflowCheetSheet.md @@ -1,48 +1,90 @@ # CURSO DE GIT Y GITFLOW -Comandos de Git basicos o frecuentes - -Comandos: -git init: Crear un nuevo git - -git add: Agregar archivos al area de preparacion - -git status: Estado del repositorio - -git: commit -m pasar archivos del area de rpeparacion al repositorio local - -git log: ver las versiones de archivos del repositorio - -git clone: clonar un repositorio remoto - -git push: modificar el repositorio remoto, con su nueva actualizacion - -git pull: actualizar tu repositorio local con la ultima version del remoto - -git add . sirve para agregar todos los archivos modificados al area de preparacion - -------------------- Git flow --------------------- - -INSTALAR EN LINUX GIT FLOW---------- -sudo apt-get update +## GIT -sudo apt-get install git-flow +--- + +### Comandos de Git basicos o frecuentes -INICIALIZAR------------------------- +```shell -git flow init +$ git init: Crear un nuevo git + +$ git add: Agregar archivos al area de preparacion + +$ git status: Estado del repositorio + +$ git: commit -m pasar archivos del area de preparacion al repositorio local + +$ git log: ver las versiones de archivos del repositorio + +$ git clone: clonar un repositorio remoto + +$ git push: modificar el repositorio remoto, con su nueva actualizacion + +$ git pull: actualizar tu repositorio local con la ultima version del remoto + +$ git add . sirve para agregar todos los archivos modificados al area de preparacion + +``` + +--- + +## GIT FLOW +--- + +### Instalar en linux debian +Para instalar git flow, se requiere tener previamente git, y se executan los siguientes comandos en tu terminal ya sea con sudo o como root. + +``` + +$ sudo apt-get update + +$ sudo apt-get install git-flow + +``` -COMENZAR UNA CARACTERISTICA--------- + +### INICIALIZAR +Una vez que estas dentro de tu directorio git o repositorio clonado, inicializa el git flow: +``` + +$ git flow init + +``` + +### RAMAS DE GIT FLOW + +![](https://www.campingcoder.com/post/20180412-git-flow.png) + +* **Master**: Rama principal que mantiene la version estable de un software. +* **Develop**: Rama que se utiliza por uno o varios programadores para un software en modo pruebas. +* **Feature**: Rama temporal o local, que sirve para que cada programador desarrolle alguna funcion especifica (Libreria, funcion, clase, etc.). +* **Release**: Rama temporal solo para publicar las etiquetas de versiones y sincronizar develop con master, esto se hace cuando tenemos una version estable de software o un punto para entregable. +* **Hotfix**: Rama temporal que se utiliza para arreglar errores criticos o bugs en el codigo de produccion, generalmente se utiliza en modo de emergencia. +#### FEATURES + + +--- + + +**1. COMENZAR UNA CARACTERISTICA (FEATURE)** + +``` git flow feature start MYFEATURE +``` +--- -FINALIZAR UNA CARACTERISTICA-------- +**2. FINALIZAR UNA CARACTERISTICA** + +``` git flow feature finish MYFEACTURE Finaliza el desarrollo de una cacteristica. @@ -53,7 +95,14 @@ git flow feature pull origin MYFEATURE Obten una caracteristica publicada por ot git flow feature track MYFEACTURE Puedes mantener un seguimiento de tus cambios. -PUBLICAR UNA VERSION----------------- +``` + +#### RELEASE +--- + +**COMO PUBLICAR UNA VERSION** + +``` git flow release start 1.0 @@ -63,7 +112,16 @@ git flow release finish 1.0 git push oirigin --all --follow-tags ----------------HOTFIX---------------- +``` + +--- + +#### HOTFIX +--- + +**COMO PUBLICAR HACER UN HOTFIX** + +``` git checkout develop @@ -75,8 +133,7 @@ git pull git flow hotfix star (Nombre) - -make changes +Hacer cambios git status (verifique el archivo de color rojo) @@ -86,10 +143,32 @@ git commit -m 'Escribe un comentario' git flow hotfix finish (name) -)Recuerda poner una etiqueta de versión fija 1.2.x por ejemplo 1.2.2 +Recuerda poner una etiqueta de versión fija 1.2.x por ejemplo 1.2.2 estabas en el maestro, y luego debes estar en la rama de desarrollo git push origin --all --follow-tags +``` +## LICENSE + +``` +Copyright (C) 2023 DECENTRALIZED CLIMATE FOUNDATION A.C. +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". +``` + +## CONTACTO Y DESARROLLADORES +> Work developed in collaboration with the [Decentralized Climate Foundation](https://decentralizedclimate.org). + +- [Gustavo Bermudez](nizaries44@gmail.com) + +## REFERENCIAS +\[1\] Daniel Kummer, "Git-flow cheatsheet", https://client.aragon.org/#/decentralizedclimate/, 2023. + +\[2\] www.campingcoder.com, "How to use git flow", https://www.campingcoder.com/2018/04/how-to-use-git-flow/, 2023.