Make the code workfor you with #GitTomáš Jukin@Inza
Tomáš Jukin     @Inza   #Git          #RubyOnRails#Objective-C
A long story short...
...about a SCM tool
...about a SCM tool         Source Code         Management
SCM?               Distributed Centralized
SCM?               Distributed                  Git,                Mercurial,                   ... Centralized    CVS,  ...
Why SCM?                  We NEED to share code!...and...     FTP sucks     Mail sucks     Dropbox sucks     USB drive sucks
Why SCM?                  We NEED to share code!...and...     FTP sucks     Mail sucks     Dropbox sucks     USB drive suc...
Why SCM?     Which SCM?
Which SCM?                      be independant             Today, we NEED to:   be productive                             ...
Which SCM?                       be independant             Today, we NEED to:    be productive                           ...
Distributed SCMBy geeks around Linux KernelThe most powerful SCM out there
Tools Ecosystem   RebaseSubmodules        Cherry-pickGitHub            Stash
http://git-scm.com/http://book.git-scm.com/http://progit.org/book/
WorkflowMe        You
WorkflowMe        You
WorkflowMe        You
Workflow
WorkflowWorking Copy
WorkflowWorking Copy
WorkflowWorking      Local Copy        Repo
WorkflowWorking      Local Copy        Repo
WorkflowWorking    Index    Local Copy     (stage)   Repo
Workflow             Local RemoteWorking    Index    Local Copy     (stage)   Repo
Workflow             Local RemoteWorking    Index    Local Copy     (stage)   Repo
Workflow             Local RemoteWorking    Index    Local     Remote Copy     (stage)   Repo       Repo
Workflow             Local RemoteWorking    Index    Local     Remote Copy     (stage)   Repo       Repo
Workflow                   Local Remote          addWorking          Index    Local     Remote Copy           (stage)   Rep...
Workflow                   Local Remote          addWorking          Index    Local     Remote Copy           (stage)   Rep...
Workflow                            Local Remote          add             commitWorking          Index             Local   ...
Workflow                            Local Remote          add             commitWorking          Index             Local   ...
Workflow                            Local Remote          add             commit           pushWorking          Index      ...
Workflow                            Local Remote          add             commit           pushWorking          Index      ...
Workflow                            Local Remote          add             commit           pushWorking          Index      ...
Workflow                            Local Remote          add             commit           pushWorking          Index      ...
Workflow                            Local Remote          add             commit           pushWorking          Index    me...
Workflow                            Local Remote          add             commit           pushWorking          Index    me...
Workflow                                    Local Remote          add                 commit               pushWorking     ...
Workflow                                    Local Remote          add                 commit               pushWorking     ...
Workflow                  checkout HEAD                                              Local Remote          add             ...
Workflow                  checkout HEAD                                              Local Remote          add             ...
Workflow                  checkout HEAD                                               Local Remote          add            ...
Workflow                  checkout HEAD                                                 Local Remote    add                ...
Workflow                     checkout HEAD                                                    Local Remote    add          ...
Workflow                    checkout HEAD                                                    Local Remote         add      ...
Workflow                    checkout HEAD                                                        Local Remote             a...
Workflow                   checkout HEAD                                                        Local Remote             ad...
Creation (in code)                                 Local Repogit clone git@repo.foo.com/foo.git foo_dircd foo_dir   ...or....
Creation (in code)                  clone url      Local Repogit clone git@repo.foo.com/foo.git foo_dircd foo_dir   ...or....
Creation (in code)                       Remote Repomkdir foo.gitcd foo.gitgit init --bare
Workflow (in code)git add -agit commit -m “Updated foo class”git push
Workflow (in code)git add -agit commit -m “Updated foo class”git push
Workflow (in code)git pull  ...or...git fetchgit merge bar_branch
InstallationWindowsmsysgit - http://goo.gl/YdToLMacOSbrew install gitLinuxapt-get install git
GUIWindowsTortoiseGit - http://goo.gl/9GfhnSmartGit - http://goo.gl/P8QqDMacOSGitX (L) - http://goo.gl/AMiqcLinuxChoose yo...
Next?     git flow “Just one approach tosolve branches, releases     and versions”
Next?   LinksInteractive Git Cheatsheet - http://goo.gl/8yMZYGitHub - http://github.comsemver - http://semver.orggit flow (...
Tomáš Jukin@Inza@JuicymoCZ
Make the code work for you with #git
Upcoming SlideShare
Loading in …5
×

Make the code work for you with #git

310 views
232 views

Published on

Slides from my presentation on Java BootCamp #5 about Git.

Java BootCamp #5 took place in Hradec Králové at 8. 11. 2012

http://www.java-bootcamp.cz/cs/bootcamp-5

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
310
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Make the code work for you with #git

  1. 1. Make the code workfor you with #GitTomáš Jukin@Inza
  2. 2. Tomáš Jukin @Inza #Git #RubyOnRails#Objective-C
  3. 3. A long story short...
  4. 4. ...about a SCM tool
  5. 5. ...about a SCM tool Source Code Management
  6. 6. SCM? Distributed Centralized
  7. 7. SCM? Distributed Git, Mercurial, ... Centralized CVS, SVN, ...
  8. 8. Why SCM? We NEED to share code!...and... FTP sucks Mail sucks Dropbox sucks USB drive sucks
  9. 9. Why SCM? We NEED to share code!...and... FTP sucks Mail sucks Dropbox sucks USB drive sucks So?
  10. 10. Why SCM? Which SCM?
  11. 11. Which SCM? be independant Today, we NEED to: be productive work offline...and... have backup grow CVS is a history SVN is centralized Mercurial can’t rebase ...
  12. 12. Which SCM? be independant Today, we NEED to: be productive work offline...and... have backup grow CVS is a history SVN is centralized Mercurial can’t rebase ... So?
  13. 13. Distributed SCMBy geeks around Linux KernelThe most powerful SCM out there
  14. 14. Tools Ecosystem RebaseSubmodules Cherry-pickGitHub Stash
  15. 15. http://git-scm.com/http://book.git-scm.com/http://progit.org/book/
  16. 16. WorkflowMe You
  17. 17. WorkflowMe You
  18. 18. WorkflowMe You
  19. 19. Workflow
  20. 20. WorkflowWorking Copy
  21. 21. WorkflowWorking Copy
  22. 22. WorkflowWorking Local Copy Repo
  23. 23. WorkflowWorking Local Copy Repo
  24. 24. WorkflowWorking Index Local Copy (stage) Repo
  25. 25. Workflow Local RemoteWorking Index Local Copy (stage) Repo
  26. 26. Workflow Local RemoteWorking Index Local Copy (stage) Repo
  27. 27. Workflow Local RemoteWorking Index Local Remote Copy (stage) Repo Repo
  28. 28. Workflow Local RemoteWorking Index Local Remote Copy (stage) Repo Repo
  29. 29. Workflow Local Remote addWorking Index Local Remote Copy (stage) Repo Repo
  30. 30. Workflow Local Remote addWorking Index Local Remote Copy (stage) Repo Repo
  31. 31. Workflow Local Remote add commitWorking Index Local Remote Copy (stage) Repo Repo
  32. 32. Workflow Local Remote add commitWorking Index Local Remote Copy (stage) Repo Repo
  33. 33. Workflow Local Remote add commit pushWorking Index Local Remote Copy (stage) Repo Repo
  34. 34. Workflow Local Remote add commit pushWorking Index Local Remote Copy (stage) Repo Repo
  35. 35. Workflow Local Remote add commit pushWorking Index Local fetch Remote Copy (stage) Repo Repo
  36. 36. Workflow Local Remote add commit pushWorking Index Local fetch Remote Copy (stage) Repo Repo
  37. 37. Workflow Local Remote add commit pushWorking Index merge Local fetch Remote Copy (stage) Repo Repo
  38. 38. Workflow Local Remote add commit pushWorking Index merge Local fetch Remote Copy (stage) Repo Repo
  39. 39. Workflow Local Remote add commit pushWorking Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  40. 40. Workflow Local Remote add commit pushWorking Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  41. 41. Workflow checkout HEAD Local Remote add commit pushWorking Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  42. 42. Workflow checkout HEAD Local Remote add commit pushWorking Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  43. 43. Workflow checkout HEAD Local Remote add commit pushWorking remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  44. 44. Workflow checkout HEAD Local Remote add commit pushWorking remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  45. 45. Workflow checkout HEAD Local Remote add commit push commit -aWorking remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  46. 46. Workflow checkout HEAD Local Remote add commit pushadd -A commit -aWorking remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  47. 47. Workflow checkout HEAD Local Remote add commit push add -A commit -a Working remove Index merge Local fetch Remote Copy (stage) Repo Repo? pull or rebase
  48. 48. Workflow checkout HEAD Local Remote add commit push add -A commit -a Working remove Index merge Local fetch Remote Copy (stage) Repo Repo? status pull or rebase
  49. 49. Creation (in code) Local Repogit clone git@repo.foo.com/foo.git foo_dircd foo_dir ...or...mkdir foo_dircd foo_dirgit init
  50. 50. Creation (in code) clone url Local Repogit clone git@repo.foo.com/foo.git foo_dircd foo_dir ...or...mkdir foo_dircd foo_dirgit init
  51. 51. Creation (in code) Remote Repomkdir foo.gitcd foo.gitgit init --bare
  52. 52. Workflow (in code)git add -agit commit -m “Updated foo class”git push
  53. 53. Workflow (in code)git add -agit commit -m “Updated foo class”git push
  54. 54. Workflow (in code)git pull ...or...git fetchgit merge bar_branch
  55. 55. InstallationWindowsmsysgit - http://goo.gl/YdToLMacOSbrew install gitLinuxapt-get install git
  56. 56. GUIWindowsTortoiseGit - http://goo.gl/9GfhnSmartGit - http://goo.gl/P8QqDMacOSGitX (L) - http://goo.gl/AMiqcLinuxChoose yours - http://goo.gl/TebDq
  57. 57. Next? git flow “Just one approach tosolve branches, releases and versions”
  58. 58. Next? LinksInteractive Git Cheatsheet - http://goo.gl/8yMZYGitHub - http://github.comsemver - http://semver.orggit flow (about) - http://goo.gl/MAF6mgit flow (CLI tool) - http://goo.gl/IbOJr
  59. 59. Tomáš Jukin@Inza@JuicymoCZ

×