SlideShare una empresa de Scribd logo
1 de 93
#TechFriday
                              No. 1



                        Git
Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday
                              No. 1

              Javier Alvarez
                @jmangt
Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




      Capacitación
        Continua
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




           2 Semanas
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




             Software
               Libre
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                             GIT
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




           Control de
            Versiones
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Cambios a los
   archivosDistribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git



  Versionamiento por Copy / Paste
                                              Archivo



                                 Archivo V1           Archivo V2



               Archivo V1 Final


                                                 Archivo V2 Cambios
           Archivo V1 Final - Final



        Archivo V1 Final – Final Copia

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   Versionamiento Local




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   Sistemas Centralizados




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   Sistemas Distribuidos




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




             Historia
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git


                                                                         Linux FTW!




Linus
Torvalds
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




     Rápido, Simple,
   Branches, Distribuido
        Escalable
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




      Lo Básico
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




             Snapshots
                No
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   Versionado por Diferencias




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   Versionado por Snapshot




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




           Integridad
           SHA-1 hash
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   24b9da6552252987aa493b52f8696cd6d3b00373




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




          Solo agrega
              data
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




       Tres Estados
         (stages)
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




         Working                         Staging                     Git Directory
         Directory                        Area                       (repositorio)




                                    Checkout del Proyecto



                    Preparar archivos

                                                      Commit




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




     1. Modificar Archivo
     2. Snapshot a Stage
          3. Commit
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




  Instalación
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Instalación
 # Ubuntu
 $ sudo apt-get install git-core

 # Redhat 6 / Centos 6
 $ sudo yum install git

 # MacOsX con homebrew
 $ brew install git

 # Windows
 http://msysgit.github.com/

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




  Configuració
        n  Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Identidad

 $ git config –-global user.name “Javier Alvarez”
 $ git config –-global user.email “jalvarez@bluekite”




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Editor

 $ git config –-global core.editor emacs




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Herramienta para Diff

 $ git config –-global merge.tool meld




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Configuración

 $ git config –-list
 user.name=Javier Alvarez
 user.email=jalvarez@bluekite.com
 merge.tool=meld
 core.editor=emacs

 $ git config user.name
 Javier Alvarez



           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Ayuda

 $ git help <accion>
 $ git help checkout
 GIT-CHECKOUT(1)                     Git Manual                   GIT-CHECKOUT(1)
 NAME
        git-checkout   - Checkout a branch or paths to the working tree
 SYNOPSIS
        git checkout   [-q] [-f] [-m] [<branch>]
        git checkout   [-q] [-f] [-m] [--detach] [<commit>]
        git checkout   [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
        git checkout   [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
        git checkout   [-p|--patch] [<tree-ish>] [--] [<paths>...]




               Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




            Workflow
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Inicializar un Repositorio

 $ cd
 $ mkdir MiProyecto
 $ cd MiProyecto

 $ git init
 Initialized empty Git repository in
    /home/javier/MiProyecto/.git/




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Agregar archivos al repositorio
 $   cd ~/MiProyecto
 $   touch index.html aboutus.html README
 $   mkdir pages
 $   touch pages/products.html

 $ git add *.html
 $ git add README
 $ git add pages

 $ git commit -m “Carga inicial de archivos”



           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Clonar un Repositorio
 $ cd ~
 $ git clone  git@github.com:jalvarezsamayoa/mi_proyecto.git
 => ~/mi_proyecto

 $ git clone git@github.com   :jalvarezsamayoa/mi_proyecto.git ElProyecto

 => ~/ElProyecto

 Protocolos:
 •
   Git://
 •
   Http://
 •
   Https://

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Grabar cambios al repositorio




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Operaciones Frecuentes
 # estado de mis archivos
 $ git status

 # agregarlos a stage
 $ git add <File>/<Dir>

 # ignorar archivos
 $ emacs .gitignore

 # ver cambios
 $ git diff

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Operaciones Frecuentes
 # grabar cambios a repositorio
 $ git commit

 # remover archivos
 $ git rm <--cached> file

 # mover archivos
 $ git mv original nuevo_nombre

 # ver historial de commits
 $ git log

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Operaciones Frecuentes
 # corregir un commit
 $ git commit –amend

 # remover un archivo de stage
 $ git reset HEAD file

 # revertir los cambios de un archivo
 $ git checkout –- file




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                Go Live!
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




              Remotes
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Remotes
 # clone de un proyecto
 $ git clone git@github.com:jalvarezsamayoa/mi_proyecto.git
 $ cd mi_proyecto
 $ git remote
 origin

 # agregar un remote manualmente
 $ git remote add bitbucket 
      https://jalvarezsamayoa@bitbucket.org/jalvarezsamayoa/mi_proyecto.git

 $ git remote -v
 # origin git://github.com/jalvarezsamayoa/mi_proyecto.git
 # bitbucket https://bitbucket.org/jalvarezsamayoa/mi_proyecto.git



           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Fetch y Pull desde un Remote
 # obtener toda la data que mi copia local no tiene
 $ git fetch [nombre-remote]

 # obtener cambios y hacer merge
 $ git pull [nombre-remote]




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Push cambios a Remote
 # enviar mis cambios a un remote
 $ git push [nombre-remote] [nombre-branch]

 $ git push origin master
 $ git push bitbucket master

 # información del remote
 $ git remote show origin

 # remover remote
 $ git remote rm bitbucket

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Tags
 # obtener un listado de tags
 $ git tag
 V0.1
 super-feature
 Estable
 V0.2

 # buscar un tag
 $ git tag -l 'v0*'
 V0.1
 V0.2

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Tags
 # crear un tag anotado
 $ git tag -a v0.3 -m 'Version 0.3'
 $ git tag
 V0.1
 V0.2
 V0.3

 # ver informacion del tag
 $ git show v.03




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Tags
 # firmar un tag con GPG
 $ git tag -s v0.3 -m 'Version 0.3 firmada'
 You need a passphrase to unlock the secret key for
 user: "Javier Alvarez <jalvarez@blukite.com>"
 1024-bit DSA key, ID F721C45A, created 2009-02-09


 $ git show v0.3
 tag v0.3
 Tagger: Javier Alvarez <jalvarez@bluekite.com>
 Date:    Mon Feb 9 15:22:20 2009 -0800
 Version 0.3 firmada
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.8 (Darwin)
 iEYEABECAAYFAkmQurIACgkQON3DxfchxFr5cACeIMN+ZxLKggJQf0QYiQBwgySN
 Ki0An2JeAVUCAiJ7Ox6ZEtK+NvZAj82/
 =WryJ
 -----END PGP SIGNATURE-----
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Push Tags
 # tranferir tags a un remote
 $ git push origin [nombre-tag]

 $ git push origin v0.3
 Counting objects: 50, done.
 Compressing objects: 100% (38/38), done.
 Writing objects: 100% (44/44), 4.56 KiB, done.
 Total 44 (delta 18), reused 8 (delta 1)
 To git@github.com:jalvarezsamayoa/mi_proyecto.git
 * [new tag]         v0.3 -> v0.3




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Tags
 # crear un tag anotado
 $ git tag -a v0.3 -m 'Version 0.3'
 $ git tag
 V0.1
 V0.2
 V0.3

 # ver informacion del tag
 $ git show v.03




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




            Branches
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                      Killer
                     Feature
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




            Snapshot
             Puntero
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                    Go Live!
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Objetos creados en un commit
 $ git add README index.html LICENCIA
 $ git commit -m 'Commit Inicial'




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Puntero al commit anterior




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Puntero al último commit




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Crear un branch
 $ git branch testing




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – En que branch estoy - HEAD




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Cambiar de Branch
 $ git checkout testing




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Realizar un cambio
 $ emacs index.html
 $ git commit -am “cambio”




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Regresar a Master
 $ git checkout master




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branches – Divergencia
 $ emacs index.html
 $ git commit -am “cambio a master”




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                    Merging
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




     1. Trabajo en mi proyecto
    2. Creo un branch para mi
               feature
   3. Hago cambios a mi branch
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   CAMBIO SUPER IMPORTANTE QUE NO
      PUEDE ESPERAR O LOS MAYAS
        DESTRUIRAN AL MUNDO!!!
        ( con los terrorristas...)
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                   1. Regreso a master
                  2. Crear HotFix branch
             3. Test. Merge HotFix → Master
                   4. Push a Producción
               5. Regreso a Feature Branch

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Mi Proyecto




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Crear un feature branch
 $ git branch -b iss53
 Switched to a new branch "iss53"




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Cambios en feature branch
 $ emacs index.html
 $ git commit -am “nuevo footer #53”




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




   Do the Harlem shake!

           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Regresar a Master y Reparar Bug
 $ git checkout master
 Switched to branch "master"




 $ git checkout -b hotfix
 Switched to branch "hotfix"

 $ emacs index.html
 $ git commit -am “arregle bug”



           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Regresar a master y hacer merge
 $ git checkout master
 Switched to branch "master"




 $ git merge hotfix
 Updating f42c576..3a0874c
 Fast forward
  README |    1 -
   1 files changed, 0 insertions(+), 1 deletions(-)




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Borrar HotFix Branch
 $ git branch -d hotfix
 Deleted branch hotfix (3a0874c).




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Regresar a Feature branch y editar
 $ git checkout iss53
 Switched to branch "iss53"




 $ emacs index.html
 $ git commit -am 'termine #53'
 [iss53]: created ad82d7a: "finished the new
  footer [issue 53]"
  1 files changed, 1 insertions(+), 0 deletions(-)




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Regresar a master y hacer merge
 $ git checkout master
 Switched to branch "master"




 $ git merge hotfix
 Updating f42c576..3a0874c
 Fast forward
  README |    1 -
   1 files changed, 0 insertions(+), 1 deletions(-)




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Nuevo commit y snapshot
 $ git branch -d iss53




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Conflictos
 $ git merge iss53
 Auto-merging index.html
 CONFLICT (content): Merge conflict in index.html
 Automatic merge failed; fix conflicts and then commit
    the result.

 [master*]$ git status
 index.html: needs merge
 # On branch master
 # Changes not staged for commit:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #
 #   unmerged:   index.html
 #
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Conflictos
 <<<<<<< HEAD:index.html
 <div id="footer">contact : email.support@github.com</div>
 =======
 <div id="footer">
   please contact us at support@github.com
 </div>
 >>>>>>> iss53:index.html




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Mergetool
 $ git mergetool
 merge tool candidates: kdiff3 tkdiff xxdiff meld gvimdiff
     opendiff emerge vimdiff
 Merging the files: index.html

 Normal merge conflict for 'index.html':
   {local}: modified
   {remote}: modified
 Hit return to start merge resolution tool (meld):




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Merging – Commit
 $ git status
 # On branch master
 # Changes to be committed:
 #   (use "git reset HEAD <file>..." to unstage)
 #
 #   modified:   index.html
 #

 $ git commit
 Merge branch 'iss53'

 Conflicts:
   index.html
 #
 # It looks like you may be committing a MERGE.
 # If this is not correct, please remove the file
 # .git/MERGE_HEAD
 # and try again.
 #


           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




            Branch
           Workflow
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                      master
                    development
                       topic
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




         Estable / Prod
       Inestable / Staging
         Feature / tmp
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branch Workflow




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branch Workflow




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




 Branch Workflow – Feature branch




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git


 Branch Workflow – Feature branch merge




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




                      Intro...
           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday - Git




           Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
#TechFriday
                              No. 1

              Javier Alvarez
                @jmangt
Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala

Más contenido relacionado

Similar a Bluekite git

GuiaPrincipiantesGitHubrfuenzalidadev.pptx
GuiaPrincipiantesGitHubrfuenzalidadev.pptxGuiaPrincipiantesGitHubrfuenzalidadev.pptx
GuiaPrincipiantesGitHubrfuenzalidadev.pptxfuenzalidarodrigo
 
Charla de Introducción a Git
Charla de Introducción a GitCharla de Introducción a Git
Charla de Introducción a GitManuel Martín
 
Introducción al desarrollo de software en comunidad con forja de software y git
Introducción al desarrollo de software en comunidad con forja de software y gitIntroducción al desarrollo de software en comunidad con forja de software y git
Introducción al desarrollo de software en comunidad con forja de software y gitDrPantera
 
Taller Git en la URJC
Taller Git en la URJC Taller Git en la URJC
Taller Git en la URJC sidelab
 
Git & GitHub Part II
Git & GitHub Part IIGit & GitHub Part II
Git & GitHub Part IIMax Rodriguez
 
Primeros pasos con git
Primeros pasos con gitPrimeros pasos con git
Primeros pasos con gitJuan Vladimir
 
Presentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora Blanco
Presentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora BlancoPresentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora Blanco
Presentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora BlancoAntonio Luque Bravo
 
Introducción a git
Introducción a gitIntroducción a git
Introducción a gitKeopx
 
Las herramientas colaborativas de desarrollo en RedDes
Las herramientas colaborativas de desarrollo en RedDesLas herramientas colaborativas de desarrollo en RedDes
Las herramientas colaborativas de desarrollo en RedDesComunidadRedDes
 
Git + Github - Betabeers Córdoba XII
Git + Github - Betabeers Córdoba XIIGit + Github - Betabeers Córdoba XII
Git + Github - Betabeers Córdoba XIIquaip
 
Más allá de Git add/commit/push
Más allá de Git add/commit/pushMás allá de Git add/commit/push
Más allá de Git add/commit/pushAlexis Lopez
 
Versionando proyectos con Git, desarrollo de software colaborativo
Versionando proyectos con Git, desarrollo de software colaborativoVersionando proyectos con Git, desarrollo de software colaborativo
Versionando proyectos con Git, desarrollo de software colaborativoHernán Aguilera
 
GIT presentación de teoría y practica.pdf
GIT presentación de teoría y practica.pdfGIT presentación de teoría y practica.pdf
GIT presentación de teoría y practica.pdfMartinBonuccelli
 

Similar a Bluekite git (20)

GuiaPrincipiantesGitHubrfuenzalidadev.pptx
GuiaPrincipiantesGitHubrfuenzalidadev.pptxGuiaPrincipiantesGitHubrfuenzalidadev.pptx
GuiaPrincipiantesGitHubrfuenzalidadev.pptx
 
Charla de Introducción a Git
Charla de Introducción a GitCharla de Introducción a Git
Charla de Introducción a Git
 
Aprendiendo GIT
Aprendiendo GITAprendiendo GIT
Aprendiendo GIT
 
Introducción al desarrollo de software en comunidad con forja de software y git
Introducción al desarrollo de software en comunidad con forja de software y gitIntroducción al desarrollo de software en comunidad con forja de software y git
Introducción al desarrollo de software en comunidad con forja de software y git
 
Git training
Git trainingGit training
Git training
 
Taller Git en la URJC
Taller Git en la URJC Taller Git en la URJC
Taller Git en la URJC
 
Git res baz ec - final
Git   res baz ec - finalGit   res baz ec - final
Git res baz ec - final
 
Git & GitHub Part II
Git & GitHub Part IIGit & GitHub Part II
Git & GitHub Part II
 
Presentacion pc2 new
Presentacion pc2 newPresentacion pc2 new
Presentacion pc2 new
 
Git 101+
Git 101+Git 101+
Git 101+
 
Primeros pasos con git
Primeros pasos con gitPrimeros pasos con git
Primeros pasos con git
 
Presentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora Blanco
Presentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora BlancoPresentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora Blanco
Presentación GitHub Antonio Luque Bravo y Miguel Ángel Zamora Blanco
 
Introducción a git
Introducción a gitIntroducción a git
Introducción a git
 
Las herramientas colaborativas de desarrollo en RedDes
Las herramientas colaborativas de desarrollo en RedDesLas herramientas colaborativas de desarrollo en RedDes
Las herramientas colaborativas de desarrollo en RedDes
 
Git + Github - Betabeers Córdoba XII
Git + Github - Betabeers Córdoba XIIGit + Github - Betabeers Córdoba XII
Git + Github - Betabeers Córdoba XII
 
Git.manual.usuario
Git.manual.usuarioGit.manual.usuario
Git.manual.usuario
 
Git for php devs
Git for php devsGit for php devs
Git for php devs
 
Más allá de Git add/commit/push
Más allá de Git add/commit/pushMás allá de Git add/commit/push
Más allá de Git add/commit/push
 
Versionando proyectos con Git, desarrollo de software colaborativo
Versionando proyectos con Git, desarrollo de software colaborativoVersionando proyectos con Git, desarrollo de software colaborativo
Versionando proyectos con Git, desarrollo de software colaborativo
 
GIT presentación de teoría y practica.pdf
GIT presentación de teoría y practica.pdfGIT presentación de teoría y practica.pdf
GIT presentación de teoría y practica.pdf
 

Último

PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfSergioMendoza354770
 
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...AlanCedillo9
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)GDGSucre
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesFundación YOD YOD
 
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxMedidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxaylincamaho
 
ejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sofejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sofJuancarlosHuertasNio1
 
Hernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxHernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxJOSEMANUELHERNANDEZH11
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx241521559
 
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...JaquelineJuarez15
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfsoporteupcology
 
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...FacuMeza2
 
Plan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxPlan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxpabonheidy28
 
La era de la educación digital y sus desafios
La era de la educación digital y sus desafiosLa era de la educación digital y sus desafios
La era de la educación digital y sus desafiosFundación YOD YOD
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIAWilbisVega
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricKeyla Dolores Méndez
 
Presentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidadPresentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidadMiguelAngelVillanuev48
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdfIsabellaMontaomurill
 
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersIván López Martín
 
Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024GiovanniJavierHidalg
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan JosephBRAYANJOSEPHPEREZGOM
 

Último (20)

PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
 
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
Instrumentación Hoy_ INTERPRETAR EL DIAGRAMA UNIFILAR GENERAL DE UNA PLANTA I...
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento Protégeles
 
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxMedidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
 
ejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sofejercicios pseint para aprogramacion sof
ejercicios pseint para aprogramacion sof
 
Hernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptxHernandez_Hernandez_Practica web de la sesion 12.pptx
Hernandez_Hernandez_Practica web de la sesion 12.pptx
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx
 
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
El gusano informático Morris (1988) - Julio Ardita (1995) - Citizenfour (2014...
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdf
 
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
ATAJOS DE WINDOWS. Los diferentes atajos para utilizar en windows y ser más e...
 
Plan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docxPlan de aula informatica segundo periodo.docx
Plan de aula informatica segundo periodo.docx
 
La era de la educación digital y sus desafios
La era de la educación digital y sus desafiosLa era de la educación digital y sus desafios
La era de la educación digital y sus desafios
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
 
Presentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidadPresentación inteligencia artificial en la actualidad
Presentación inteligencia artificial en la actualidad
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdf
 
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
 
Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024Cortes-24-de-abril-Tungurahua-3 año 2024
Cortes-24-de-abril-Tungurahua-3 año 2024
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Joseph
 

Bluekite git

  • 1. #TechFriday No. 1 Git Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 2. #TechFriday No. 1 Javier Alvarez @jmangt Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 3. #TechFriday - Git Capacitación Continua Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 4. #TechFriday - Git 2 Semanas Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 5. #TechFriday - Git Software Libre Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 6. #TechFriday - Git GIT Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 7. #TechFriday - Git Control de Versiones Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 8. #TechFriday - Git Cambios a los archivosDistribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 9. #TechFriday - Git Versionamiento por Copy / Paste Archivo Archivo V1 Archivo V2 Archivo V1 Final Archivo V2 Cambios Archivo V1 Final - Final Archivo V1 Final – Final Copia Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 10. #TechFriday - Git Versionamiento Local Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 11. #TechFriday - Git Sistemas Centralizados Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 12. #TechFriday - Git Sistemas Distribuidos Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 13. #TechFriday - Git Historia Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 14. #TechFriday - Git Linux FTW! Linus Torvalds Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 15. #TechFriday - Git Rápido, Simple, Branches, Distribuido Escalable Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 16. #TechFriday - Git Lo Básico Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 17. #TechFriday - Git Snapshots No Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 18. #TechFriday - Git Versionado por Diferencias Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 19. #TechFriday - Git Versionado por Snapshot Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 20. #TechFriday - Git Integridad SHA-1 hash Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 21. #TechFriday - Git 24b9da6552252987aa493b52f8696cd6d3b00373 Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 22. #TechFriday - Git Solo agrega data Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 23. #TechFriday - Git Tres Estados (stages) Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 24. #TechFriday - Git Working Staging Git Directory Directory Area (repositorio) Checkout del Proyecto Preparar archivos Commit Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 25. #TechFriday - Git 1. Modificar Archivo 2. Snapshot a Stage 3. Commit Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 26. #TechFriday - Git Instalación Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 27. #TechFriday - Git Instalación # Ubuntu $ sudo apt-get install git-core # Redhat 6 / Centos 6 $ sudo yum install git # MacOsX con homebrew $ brew install git # Windows http://msysgit.github.com/ Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 28. #TechFriday - Git Configuració n Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 29. #TechFriday - Git Identidad $ git config –-global user.name “Javier Alvarez” $ git config –-global user.email “jalvarez@bluekite” Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 30. #TechFriday - Git Editor $ git config –-global core.editor emacs Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 31. #TechFriday - Git Herramienta para Diff $ git config –-global merge.tool meld Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 32. #TechFriday - Git Configuración $ git config –-list user.name=Javier Alvarez user.email=jalvarez@bluekite.com merge.tool=meld core.editor=emacs $ git config user.name Javier Alvarez Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 33. #TechFriday - Git Ayuda $ git help <accion> $ git help checkout GIT-CHECKOUT(1) Git Manual GIT-CHECKOUT(1) NAME git-checkout - Checkout a branch or paths to the working tree SYNOPSIS git checkout [-q] [-f] [-m] [<branch>] git checkout [-q] [-f] [-m] [--detach] [<commit>] git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>] git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>... git checkout [-p|--patch] [<tree-ish>] [--] [<paths>...] Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 34. #TechFriday - Git Workflow Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 35. #TechFriday - Git Inicializar un Repositorio $ cd $ mkdir MiProyecto $ cd MiProyecto $ git init Initialized empty Git repository in /home/javier/MiProyecto/.git/ Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 36. #TechFriday - Git Agregar archivos al repositorio $ cd ~/MiProyecto $ touch index.html aboutus.html README $ mkdir pages $ touch pages/products.html $ git add *.html $ git add README $ git add pages $ git commit -m “Carga inicial de archivos” Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 37. #TechFriday - Git Clonar un Repositorio $ cd ~ $ git clone git@github.com:jalvarezsamayoa/mi_proyecto.git => ~/mi_proyecto $ git clone git@github.com :jalvarezsamayoa/mi_proyecto.git ElProyecto => ~/ElProyecto Protocolos: • Git:// • Http:// • Https:// Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 38. #TechFriday - Git Grabar cambios al repositorio Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 39. #TechFriday - Git Operaciones Frecuentes # estado de mis archivos $ git status # agregarlos a stage $ git add <File>/<Dir> # ignorar archivos $ emacs .gitignore # ver cambios $ git diff Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 40. #TechFriday - Git Operaciones Frecuentes # grabar cambios a repositorio $ git commit # remover archivos $ git rm <--cached> file # mover archivos $ git mv original nuevo_nombre # ver historial de commits $ git log Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 41. #TechFriday - Git Operaciones Frecuentes # corregir un commit $ git commit –amend # remover un archivo de stage $ git reset HEAD file # revertir los cambios de un archivo $ git checkout –- file Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 42. #TechFriday - Git Go Live! Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 43. #TechFriday - Git Remotes Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 44. #TechFriday - Git Remotes # clone de un proyecto $ git clone git@github.com:jalvarezsamayoa/mi_proyecto.git $ cd mi_proyecto $ git remote origin # agregar un remote manualmente $ git remote add bitbucket https://jalvarezsamayoa@bitbucket.org/jalvarezsamayoa/mi_proyecto.git $ git remote -v # origin git://github.com/jalvarezsamayoa/mi_proyecto.git # bitbucket https://bitbucket.org/jalvarezsamayoa/mi_proyecto.git Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 45. #TechFriday - Git Fetch y Pull desde un Remote # obtener toda la data que mi copia local no tiene $ git fetch [nombre-remote] # obtener cambios y hacer merge $ git pull [nombre-remote] Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 46. #TechFriday - Git Push cambios a Remote # enviar mis cambios a un remote $ git push [nombre-remote] [nombre-branch] $ git push origin master $ git push bitbucket master # información del remote $ git remote show origin # remover remote $ git remote rm bitbucket Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 47. #TechFriday - Git Tags # obtener un listado de tags $ git tag V0.1 super-feature Estable V0.2 # buscar un tag $ git tag -l 'v0*' V0.1 V0.2 Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 48. #TechFriday - Git Tags # crear un tag anotado $ git tag -a v0.3 -m 'Version 0.3' $ git tag V0.1 V0.2 V0.3 # ver informacion del tag $ git show v.03 Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 49. #TechFriday - Git Tags # firmar un tag con GPG $ git tag -s v0.3 -m 'Version 0.3 firmada' You need a passphrase to unlock the secret key for user: "Javier Alvarez <jalvarez@blukite.com>" 1024-bit DSA key, ID F721C45A, created 2009-02-09 $ git show v0.3 tag v0.3 Tagger: Javier Alvarez <jalvarez@bluekite.com> Date: Mon Feb 9 15:22:20 2009 -0800 Version 0.3 firmada -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEABECAAYFAkmQurIACgkQON3DxfchxFr5cACeIMN+ZxLKggJQf0QYiQBwgySN Ki0An2JeAVUCAiJ7Ox6ZEtK+NvZAj82/ =WryJ -----END PGP SIGNATURE----- Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 50. #TechFriday - Git Push Tags # tranferir tags a un remote $ git push origin [nombre-tag] $ git push origin v0.3 Counting objects: 50, done. Compressing objects: 100% (38/38), done. Writing objects: 100% (44/44), 4.56 KiB, done. Total 44 (delta 18), reused 8 (delta 1) To git@github.com:jalvarezsamayoa/mi_proyecto.git * [new tag] v0.3 -> v0.3 Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 51. #TechFriday - Git Tags # crear un tag anotado $ git tag -a v0.3 -m 'Version 0.3' $ git tag V0.1 V0.2 V0.3 # ver informacion del tag $ git show v.03 Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 52. #TechFriday - Git Branches Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 53. #TechFriday - Git Killer Feature Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 54. #TechFriday - Git Snapshot Puntero Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 55. #TechFriday - Git Go Live! Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 56. #TechFriday - Git Branches – Objetos creados en un commit $ git add README index.html LICENCIA $ git commit -m 'Commit Inicial' Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 57. #TechFriday - Git Branches – Puntero al commit anterior Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 58. #TechFriday - Git Branches – Puntero al último commit Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 59. #TechFriday - Git Branches – Crear un branch $ git branch testing Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 60. #TechFriday - Git Branches – En que branch estoy - HEAD Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 61. #TechFriday - Git Branches – Cambiar de Branch $ git checkout testing Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 62. #TechFriday - Git Branches – Realizar un cambio $ emacs index.html $ git commit -am “cambio” Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 63. #TechFriday - Git Branches – Regresar a Master $ git checkout master Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 64. #TechFriday - Git Branches – Divergencia $ emacs index.html $ git commit -am “cambio a master” Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 65. #TechFriday - Git Merging Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 66. #TechFriday - Git 1. Trabajo en mi proyecto 2. Creo un branch para mi feature 3. Hago cambios a mi branch Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 67. #TechFriday - Git CAMBIO SUPER IMPORTANTE QUE NO PUEDE ESPERAR O LOS MAYAS DESTRUIRAN AL MUNDO!!! ( con los terrorristas...) Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 68. #TechFriday - Git 1. Regreso a master 2. Crear HotFix branch 3. Test. Merge HotFix → Master 4. Push a Producción 5. Regreso a Feature Branch Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 69. #TechFriday - Git Merging – Mi Proyecto Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 70. #TechFriday - Git Merging – Crear un feature branch $ git branch -b iss53 Switched to a new branch "iss53" Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 71. #TechFriday - Git Merging – Cambios en feature branch $ emacs index.html $ git commit -am “nuevo footer #53” Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 72. #TechFriday - Git Do the Harlem shake! Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 73. #TechFriday - Git Merging – Regresar a Master y Reparar Bug $ git checkout master Switched to branch "master" $ git checkout -b hotfix Switched to branch "hotfix" $ emacs index.html $ git commit -am “arregle bug” Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 74. #TechFriday - Git Merging – Regresar a master y hacer merge $ git checkout master Switched to branch "master" $ git merge hotfix Updating f42c576..3a0874c Fast forward README | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 75. #TechFriday - Git Merging – Borrar HotFix Branch $ git branch -d hotfix Deleted branch hotfix (3a0874c). Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 76. #TechFriday - Git Merging – Regresar a Feature branch y editar $ git checkout iss53 Switched to branch "iss53" $ emacs index.html $ git commit -am 'termine #53' [iss53]: created ad82d7a: "finished the new footer [issue 53]" 1 files changed, 1 insertions(+), 0 deletions(-) Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 77. #TechFriday - Git Merging – Regresar a master y hacer merge $ git checkout master Switched to branch "master" $ git merge hotfix Updating f42c576..3a0874c Fast forward README | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 78. #TechFriday - Git Merging – Nuevo commit y snapshot $ git branch -d iss53 Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 79. #TechFriday - Git Merging – Conflictos $ git merge iss53 Auto-merging index.html CONFLICT (content): Merge conflict in index.html Automatic merge failed; fix conflicts and then commit the result. [master*]$ git status index.html: needs merge # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # unmerged: index.html # Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 80. #TechFriday - Git Merging – Conflictos <<<<<<< HEAD:index.html <div id="footer">contact : email.support@github.com</div> ======= <div id="footer"> please contact us at support@github.com </div> >>>>>>> iss53:index.html Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 81. #TechFriday - Git Merging – Mergetool $ git mergetool merge tool candidates: kdiff3 tkdiff xxdiff meld gvimdiff opendiff emerge vimdiff Merging the files: index.html Normal merge conflict for 'index.html': {local}: modified {remote}: modified Hit return to start merge resolution tool (meld): Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 82. #TechFriday - Git Merging – Commit $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: index.html # $ git commit Merge branch 'iss53' Conflicts: index.html # # It looks like you may be committing a MERGE. # If this is not correct, please remove the file # .git/MERGE_HEAD # and try again. # Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 83. #TechFriday - Git Branch Workflow Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 84. #TechFriday - Git master development topic Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 85. #TechFriday - Git Estable / Prod Inestable / Staging Feature / tmp Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 86. #TechFriday - Git Branch Workflow Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 87. #TechFriday - Git Branch Workflow Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 88. #TechFriday - Git Branch Workflow – Feature branch Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 89. #TechFriday - Git Branch Workflow – Feature branch merge Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 90. #TechFriday - Git Intro... Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 91. #TechFriday - Git Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 92. #TechFriday - Git Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • 93. #TechFriday No. 1 Javier Alvarez @jmangt Distribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala

Notas del editor

  1. VCS rcs Suma los patches
  2. Colaboracion CVS Subversion Perforce Checkout de archivos Se cae el server!!! Se corrompe la db! Hay que estar conectado! Lentos
  3. Colaboracion CVS Subversion Perforce Checkout de archivos Se cae el server!!! Se corrompe la db! Hay que estar conectado! Lentos
  4. Kernel BitKeeper Nace 2005
  5. Cvs Subversion Perforce Bazar Cambios realizados por archivos
  6. Mini filesystem Toma una foto Guarda archivos cambiados Genera un link a la ultima version de los no cambiados Operaciones locales, super rapido Difrencia hace un mes Offline
  7. Git directory = db Git clone &lt;= directory Working es un checkout de una version de repo Staging =&gt; archivo dentro de directory == Index Que entrara en el commit
  8. Because a branch in Git is in actuality a simple file that contains the 40 character SHA-1 checksum of the commit it points to, branches are cheap to create and destroy. Creating a new branch is as quick and simple as writing 41 bytes to a file (40 characters and a newline).
  9. It’s worth noting here that the work you did in your hotfix branch is not contained in the files in your iss53 branch. If you need to pull it in, you can merge your master branch into your iss53 branch by running git merge master, or you can wait to integrate those changes until you decide to pull the iss53 branch back into master later.
  10. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  11. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  12. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  13. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  14. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  15. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  16. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  17. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging
  18. Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two. Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it Git automatically identifies the best common-ancestor merge base for branch merging