Introduction à Git (avec PHPStorm)

Embed Size (px)

Citation preview

  • 1. Introduction git (avec PhpStorm)

2. Une brve histoire de git

  • Cr en 2005 par Linus Torvald 3. Grer les sources de Linux 4. A la place de BitKeeper

lundi 13 septembre 2010 Introduction GIT 5. Pourquoi git ?

  • Dveloppement non-linaire 6. Dveloppement distribu 7. Bonne gestion de gros projets 8. Rapidit / Scalabilit

lundi 13 septembre 2010 Introduction GIT 9. Le dveloppement dcentralis

  • Chaque dveloppeur possde l'historique complet du projet 10. Cration de branches locales 11. Gestion des remotes (Origin, etc) 12. Pas besoin de connexion pour commiter

lundi 13 septembre 2010 Introduction GIT 13. Qu'est-ce qu'un remote ?

  • C'est un dpt distant 14. Par exemple origin 15. Ou n'importe quel remote que vous avez ajout 16. git remote add pho git://pho-desktop/repo.git 17. git remote show

lundi 13 septembre 2010 Introduction GIT 18. Workflow subversion lundi 13 septembre 2010 Introduction GIT 19. (Notre) workflow git lundi 13 septembre 2010 Introduction GIT 20. Workflow git, 4 tapes

  • crire les modifications 21. Mettre en staging 22. Commiter 23. Pusher

lundi 13 septembre 2010 Introduction GIT 24. Travailler avec des branches !

  • Pas chre et rapide a crer 25. Facile merger 26. Permet de cloisonner le dev 27. Merger des remotes dans vos locales 28. Continuer de travailler sur le master 29. Etc. 30. Par exemple: 1 branche par ticket / feature

lundi 13 septembre 2010 Introduction GIT 31. Travailler avec des branches ! lundi 13 septembre 2010 Introduction GIT 32. Branches locales et remotes

  • Une branche locale n'existe que sur votre dpt 33. Une branche remote est prsente sur un remote

lundi 13 septembre 2010 Introduction GIT 34. Git par la pratique (avec PHPStorm)

  • Cloner un dpt 35. Crer des commits 36. Pusher des modifications 37. Puller des modifications 38. Changer de branche 39. Merger des branches 40. Et plus encore !

lundi 13 septembre 2010 Introduction GIT 41. Obtenir de l'aide git help command lundi 13 septembre 2010 Introduction GIT 42. Avant toute chose git://srv/repo.git lundi 13 septembre 2010 Introduction GIT 43. Cloner un dpt git clone git://srv/repo.git lundi 13 septembre 2010 Introduction GIT 44. Cloner un dpt lundi 13 septembre 2010 Introduction GIT 45. Cloner un dpt lundi 13 septembre 2010 Introduction GIT 46. Crer des commits

  • Faire des modifications (vous savez faire normalement) 47. Stager des modifications 48. Commiter !

lundi 13 septembre 2010 Introduction GIT 49. Crer des commits - Staging git status lundi 13 septembre 2010 Introduction GIT 50. Crer des commits - Staging lundi 13 septembre 2010 Introduction GIT 51. Crer des commits - Staging git add web/portail_dev.php lundi 13 septembre 2010 Introduction GIT 52. Crer des commits - Commiter git commit -m hello world ! lundi 13 septembre 2010 Introduction GIT 53. Crer des commits - PhpStorm lundi 13 septembre 2010 Introduction GIT 54. Crer des commits - PhpStorm lundi 13 septembre 2010 Introduction GIT 55. Pusher des modifications git push lundi 13 septembre 2010 Introduction GIT 56. Pusher des modifications lundi 13 septembre 2010 Introduction GIT 57. Pusher des modifications lundi 13 septembre 2010 Introduction GIT 58. Pusher des modifications lundi 13 septembre 2010 Introduction GIT 59. Puller des modifications git pull lundi 13 septembre 2010 Introduction GIT 60. Puller des modifications git fetch git merge lundi 13 septembre 2010 Introduction GIT 61. Puller des modifications lundi 13 septembre 2010 Introduction GIT 62. Puller des modifications lundi 13 septembre 2010 Introduction GIT 63. Changer de branche git checkout [-b] foobar lundi 13 septembre 2010 Introduction GIT 64. Changer de branche lundi 13 septembre 2010 Introduction GIT 65. Changer de branche lundi 13 septembre 2010 Introduction GIT 66. Changer de branche lundi 13 septembre 2010 Introduction GIT 67. Merger des branches git checkout master git merge foobar lundi 13 septembre 2010 Introduction GIT 68. Merger des branches lundi 13 septembre 2010 Introduction GIT 69. Merger des branches lundi 13 septembre 2010 Introduction GIT 70. Merger des branches lundi 13 septembre 2010 Introduction GIT 71. La commande stash git stash git unstash lundi 13 septembre 2010 Introduction GIT 72. Le staging interactif git add -i lundi 13 septembre 2010 Introduction GIT 73. Le staging interactif lundi 13 septembre 2010 Introduction GIT 74. Le staging interactif lundi 13 septembre 2010 Introduction GIT 75. Le staging interactif lundi 13 septembre 2010 Introduction GIT 76. Le staging interactif lundi 13 septembre 2010 Introduction GIT 77. Ressources lundi 13 septembre 2010 Introduction GIT 78. Ressources

  • http://git-scm.com/ 79. http://book.git-scm.com/ 80. http://progit.org/book/

lundi 13 septembre 2010 Introduction GIT 81. Questions ? lundi 13 septembre 2010 Introduction GIT