Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Git Going for the Transylvania JUG

313 visualizaciones

Publicado el

Matthew McCullough presenting Git to the Transylvania Java Users Group in October of 2011.

Delivered on October 18, 2011

Publicado en: Tecnología
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Git Going for the Transylvania JUG

  1. 1. Introduction to Git at the Transylvania JUG by Matthew McCullough
  2. 2. Matthew McCullough @matthewmccull
  3. 3. Git
  4. 4. “Cool kids” version control system
  5. 5. Open Source
  6. 6. bash scripts ☛ C code
  7. 7.
  8. 8. Git -noun British Slang. an unpleasant or contemptible person -Oxford English Dictionary “ ”
  9. 9. I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git. -Linus Torvalds “ ”
  10. 10. ➡How to commit, branch and tag ➡How Git implements a new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  11. 11. ➡How to set up a Git repository
  12. 12. > cd myproj > git init Initialized empty Git repository in /stuff/myproj/.git/
  13. 13. ➡How to set up a Git repository
  14. 14. ➡How to commit, branch and tag ➡How Git implements a new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  15. 15. ➡How to commit, branch and tag
  16. 16. ➡How to commit
  17. 17. > git add <FILENAME>
  18. 18. Local Branches Remote Branches Upstream Branches Working Copy commit
  19. 19. > git status # On branch master # Initial commit # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # new file: myfile.txt
  20. 20. > git commit -m”<MESSAGE>” [master (root-commit) 498cc44] My first commit 1 files changed, 5 insertions(+), 0 deletions(-) create mode 100644 myfile.txt
  21. 21. ➡How to branch
  22. 22. > git branch <BRANCHNAME>
  23. 23. Local Branches Remote Branches Upstream Branches Working Copy Branches
  24. 24. > git checkout <BRANCHNAME> Switched to branch 'mybranch'
  25. 25. Local Branches Remote Branches Upstream Branches Working Copy Branches
  26. 26. Insane branch count?
  27. 27. Local Remote Upstream Integ Product Integ Product Integ Product
  28. 28. Local Remote Upstream Integ Product Integ Product Integ Product Idea Story Feature FeatureFeature
  29. 29. Local Remote Upstream Integ Product Integ Product Integ Product Idea Story Feature FeatureFeature
  30. 30. ➡How to tag
  31. 31. > git tag <TAGNAME>
  32. 32. > git tag -a <TAGNAME> -m”<MESSAGE>”
  33. 33. ➡How to commit, branch and tag
  34. 34. ➡How to commit, branch and tag ➡How Git implements a new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  35. 35. ➡How Git implements a new commit-referencing syntax
  36. 36. 9AB223D28B1AA46EF1780B22F304982E39872C34 <html> <body> <p>This is a test</p> <img src="http://ai.com/icon.gif"> </body> </html>
  37. 37. > git log commit 0fc27c73dea82a0576c6cf262fb517d24e75a223 Author: Matthew McCullough <matthewm@ambientideas.com> Date: Mon Oct 24 10:42:20 2013 +0300 Performance enhancement of calc engine commit 7d946e814233814b1780ed1035da271cbb37206d Author: Matthew McCullough <matthewm@ambientideas.com> Date: Mon Oct 24 12:59:41 2013 +0300 Translation to Esperanto
  38. 38. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  39. 39. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  40. 40. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  41. 41. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  42. 42. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  43. 43. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  44. 44. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  45. 45. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  46. 46. Hashes tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob<html> <body></body> </html> 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162
  47. 47. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  48. 48. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  49. 49. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  50. 50. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  51. 51. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  52. 52. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  53. 53. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  54. 54. v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7
  55. 55. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1
  56. 56. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1
  57. 57. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1
  58. 58. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1
  59. 59. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1
  60. 60. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1
  61. 61. ➡How Git implements a new commit-referencing syntax
  62. 62. ➡How to commit, branch and tag ➡How Git implements a new commit-referencing syntax ➡How to pull and push changes between repositories ➡How to set up a Git repository
  63. 63. ➡How to pull and push changes between repositories
  64. 64. > git clone http://this.com/myproj.git > cd myproj Cloning into hellogitworld... remote: Counting objects: 3871, done. remote: Compressing objects: 100% (73/73), done. remote: Total 3871 (delta 51), reused 3853 (delta 36) Receiving objects: 100% (3871/3871), 297.88 KiB | 35 KiB/s, done. Resolving deltas: 100% (51/51), done.
  65. 65. Local Branches Remote Branches Upstream Branches Working Copy merge merge commit fetch push clone clone clone push pull pull pull
  66. 66. Central Repo Centralized
  67. 67. Blessed Repo Dictatorship
  68. 68. Certified Repo Development Repo IntegrationManaged Continuous Integration Server
  69. 69. ➡How to pull and push changes between repositories
  70. 70. Introduction to Git & Gerrit at the Transylvania JUG by Matthew McCullough

×