• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Bluekite git
 

Bluekite git

on

  • 244 views

Una introducción a la herramienta para versionado Git. Parte de la iniciativa Bluekite TechFriday

Una introducción a la herramienta para versionado Git. Parte de la iniciativa Bluekite TechFriday

Statistics

Views

Total Views
244
Views on SlideShare
244
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • VCS rcs Suma los patches
  • Colaboracion CVS Subversion Perforce Checkout de archivos Se cae el server!!! Se corrompe la db! Hay que estar conectado! Lentos
  • Colaboracion CVS Subversion Perforce Checkout de archivos Se cae el server!!! Se corrompe la db! Hay que estar conectado! Lentos
  • Kernel BitKeeper Nace 2005
  • Cvs Subversion Perforce Bazar Cambios realizados por archivos
  • 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
  • Git directory = db Git clone archivo dentro de directory == Index Que entrara en el commit
  • 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).
  • 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.
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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

Bluekite git Bluekite git Presentation Transcript

  • #TechFriday No. 1 GitDistribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala
  • #TechFriday No. 1 Javier Alvarez @jmangtDistribuido 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!LinusTorvalds 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 @jmangtDistribuido bajo Creative Commons Attribution Share Alike 3.0 Guatemala