• Like
Presentacion git
Upcoming SlideShare
Loading in...5
×

Presentacion git

  • 5,426 views
Uploaded on

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

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

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,426
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
83
Comments
0
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Git & Github.Nacho Martín
  • 2. Git
  • 3. Sistema de control de versiones
  • 4. Sistema de control de versiones Distribuido
  • 5. Ordenador 1 Servidor fichero versión 3 versión 2Ordenador 2 versión 1 fichero
  • 6. 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
  • 7. Ventajas(y desventajas)
  • 8. Muy rápido
  • 9. Ramas fáciles
  • 10. Flexible
  • 11. Más difícil
  • 12. ¿Más difícil?
  • 13. git init ogit clone https://github.com/symfony/symfony.git
  • 14. echo "hola mundo" > saludo
  • 15. echo "hola mundo" > saludogit status
  • 16. 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)
  • 17. 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)
  • 18. 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)
  • 19. git add saludo
  • 20. git add saludogit status
  • 21. git add saludogit status# On branch master## Initial commit## Changes to be committed:# (use "git rm --cached <file>..." to unstage)## new file: saludo#
  • 22. git commit -m "Commit inicial"
  • 23. git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludo
  • 24. git commit -m "Commit inicial"[master (root-commit) df5839d] Commit inicial 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 saludogit log
  • 25. 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
  • 26. 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
  • 27. 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
  • 28. 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
  • 29. echo "como va todo" >> saludo Cambios sin commitear master Commit inicial
  • 30. echo "como va todo" >> saludo Cambios sin commitear master Commit inicialgit add saludogit commit -m "Amplio saludo" master Amplio saludo Commit inicial
  • 31. echo "como va todo" >> saludo Cambios sin commitear master Commit inicialgit commit -a -m "Amplio saludo" master Amplio saludo Commit inicial
  • 32. 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
  • 33. master
  • 34. master Amplio saludoCommit inicial ( df5839d78e7... )
  • 35. master Amplio saludo Commit inicial ( df5839d78e7... )git checkout df5839 master Amplio saludo Commit inicial
  • 36. master Amplio saludo Commit inicial ( df5839d78e7... )git checkout df5839 master Amplio saludo Commit inicialgit checkout master master Commit inicial ( df5839d78e7... )
  • 37. Alicia Githubgit remote add origin git://github.com/user/repo.git remotes/origin/master master
  • 38. Alicia Githubgit fetch origin remotes/origin/master remotes/origin/master master
  • 39. Alicia Githubgit fetch origingit merge origin/master master remotes/origin/master remotes/origin/master
  • 40. Alicia Githubgit fetch origingit merge origin/master } git pull origin master master remotes/origin/master remotes/origin/master
  • 41. Alicia Github master remotes/origin/master
  • 42. Alicia Githubgit push origin master master remotes/origin/master remotes/origin/master
  • 43. svn update git pullsvn update -r git checkoutsvn add archivo git add archivo git commit -a -msvn commit -m git push
  • 44. Ramas
  • 45. git checkout -b facebook master facebook
  • 46. 2 commits más tarde... facebook master
  • 47. git checkout master facebook master
  • 48. git checkout mastergit merge facebook master facebook
  • 49. git checkout mastergit merge facebookgit branch -d facebook master
  • 50. facebookmaster
  • 51. facebookmaster
  • 52. git checkout master facebook master
  • 53. arreglamos bug en master (y hacemos commit) facebook master
  • 54. git checkout facebook facebook master
  • 55. git merge master master facebook
  • 56. facebookmaster
  • 57. git rebase master facebook master
  • 58. meld
  • 59. En el tintero...git rm <fichero>git mv <fichero> <destino>git reset d5f64567 [--hard]git tag version-1.0 d5f64567git cherry-pickgit submodule
  • 60. Symfony2 ♥ Git
  • 61. bin/vendorsdeps deps.lock
  • 62. 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>
  • 63. Github
  • 64. Repo Fork! MiRepo Work MiRepo Pull requestRepo
  • 65. ¿PARA QUÉ? http://www.flickr.com/photos/deadwords/2473829859/
  • 66. ¿Preguntas?
  • 67. Gracias nitram.ohcan@gmail.com @nacmartin limenius.com