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

Presentacion git

on

  • 5,627 views

Git & github con notas para usuarios de Syfmony2. Jornadas Symfony Vigo 2011

Git & github con notas para usuarios de Syfmony2. Jornadas Symfony Vigo 2011

Statistics

Views

Total Views
5,627
Views on SlideShare
1,763
Embed Views
3,864

Actions

Likes
5
Downloads
83
Comments
0

10 Embeds 3,864

http://www.symfony.es 3291
http://feeds.feedburner.com 272
http://nacho-martin.com 171
http://blog.solucionex.com 94
http://nacho-martin.lo 17
http://translate.googleusercontent.com 9
http://symfony.es 5
http://localhost 2
http://paper.li 2
http://a0.twimg.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

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

Presentacion git Presentacion git Presentation Transcript

  • Git & Github.Nacho Martín
  • Git
  • Sistema de control de versiones
  • Sistema de control de versiones Distribuido
  • Ordenador 1 Servidor fichero versión 3 versión 2Ordenador 2 versión 1 fichero
  • Ordenador 1 fichero versión 3 versión 2 versión 1Ordenador 2 Ordenador 3 fichero fichero versión 3 versión 3 versión 2 versión 2 versión 1 versión 1
  • Ventajas(y desventajas)
  • Muy rápido
  • Ramas fáciles
  • Flexible
  • Más difícil
  • ¿Más difícil?
  • git init ogit clone https://github.com/symfony/symfony.git
  • echo "hola mundo" > saludo
  • echo "hola mundo" > saludogit status
  • echo "hola mundo" > saludogit status# On branch master## Initial commit## Untracked files:# (use "git add <file>..." to include in whatwill be committed)## saludonothing added to commit but untracked filespresent (use "git add" to track)
  • echo "hola mundo" > saludogit status# On branch master## Initial commit## Untracked files:# (use "git add <file>..." to include in whatwill be committed)## saludonothing added to commit but untracked filespresent (use "git add" to track)
  • echo "hola mundo" > saludogit status# On branch master## Initial commit## Untracked files:# (use "git add <file>..." to include in whatwill be committed)## saludonothing added to commit but untracked filespresent (use "git add" to track)
  • git add saludo
  • git add saludogit status
  • git add saludogit status# On branch master## Initial commit## Changes to be committed:# (use "git rm --cached <file>..." to unstage)## new file: saludo#
  • git commit -m "Commit inicial"
  • git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo
  • git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludogit log
  • git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludogit logcommit df5839d78e7b9c14672ca722c80f2a5a897ebfbaAuthor: Nacho Martín <nitram.ohcan@gmail.com>Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicial
  • git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludogit logcommit df5839d78e7b9c14672ca722c80f2a5a897ebfbaAuthor: Nacho Martín <nitram.ohcan@gmail.com>Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicial
  • git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludogit logcommit df5839d78e7b9c14672ca722c80f2a5a897ebfbaAuthor: Nacho Martín <nitram.ohcan@gmail.com>Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicial
  • git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludogit logcommit df5839d78e7b9c14672ca722c80f2a5a897ebfbaAuthor: Nacho Martín <nitram.ohcan@gmail.com>Date: Tue Nov 8 14:43:38 2011 +0100 Commit inicialgitk o GitX master
  • echo "como va todo" >> saludo Cambios sin commitear master Commit inicial
  • echo "como va todo" >> saludo Cambios sin commitear master Commit inicialgit add saludogit commit -m "Amplio saludo" master Amplio saludo Commit inicial
  • echo "como va todo" >> saludo Cambios sin commitear master Commit inicialgit commit -a -m "Amplio saludo" master Amplio saludo Commit inicial
  • echo "como va todo" >> saludo Cambios sin commitear master Commit inicial Solo para ficheros ya trackeadosgit commit -a -m "Amplio saludo" master Amplio saludo Commit inicial
  • master
  • master Amplio saludoCommit inicial ( df5839d78e7... )
  • master Amplio saludo Commit inicial ( df5839d78e7... )git checkout df5839 master Amplio saludo Commit inicial
  • master Amplio saludo Commit inicial ( df5839d78e7... )git checkout df5839 master Amplio saludo Commit inicialgit checkout master master Commit inicial ( df5839d78e7... )
  • Alicia Githubgit remote add origin git://github.com/user/repo.git remotes/origin/master master
  • Alicia Githubgit fetch origin remotes/origin/master remotes/origin/master master
  • Alicia Githubgit fetch origingit merge origin/master master remotes/origin/master remotes/origin/master
  • Alicia Githubgit fetch origingit merge origin/master } git pull origin master master remotes/origin/master remotes/origin/master
  • Alicia Github master remotes/origin/master
  • Alicia Githubgit push origin master master remotes/origin/master remotes/origin/master
  • svn update git pullsvn update -r git checkoutsvn add archivo git add archivo git commit -a -msvn commit -m git push
  • Ramas
  • git checkout -b facebook master facebook
  • 2 commits más tarde... facebook master
  • git checkout master facebook master
  • git checkout mastergit merge facebook master facebook
  • git checkout mastergit merge facebookgit branch -d facebook master
  • facebookmaster
  • facebookmaster
  • git checkout master facebook master
  • arreglamos bug en master (y hacemos commit) facebook master
  • git checkout facebook facebook master
  • git merge master master facebook
  • facebookmaster
  • git rebase master facebook master
  • meld
  • En el tintero...git rm <fichero>git mv <fichero> <destino>git reset d5f64567 [--hard]git tag version-1.0 d5f64567git cherry-pickgit submodule
  • Symfony2 ♥ Git
  • bin/vendorsdeps deps.lock
  • deps [symfony] git=http://github.com/symfony/symfony.git version=v2.0.5 prioritario deps.lock symfony 7f21a5e9792f892166a550bb5579 { git clone <repositorio>bin/vendors install git fetch origin git reset --hard <version>
  • Github
  • Repo Fork! MiRepo Work MiRepo Pull requestRepo
  • ¿PARA QUÉ? http://www.flickr.com/photos/deadwords/2473829859/
  • ¿Preguntas?
  • Gracias nitram.ohcan@gmail.com @nacmartin limenius.com