The Foundations of Collaboration with GitHub • SIGCSE 2014

The Foundations of Collaboration with GitHub • SIGCSE 2014

Bededa744012c87721d68f69342f81b0?s=128

Matthew McCullough

March 08, 2014
Tweet

Transcript

  1. A foundation of collaboration presented to the delegates of SIGCSE

    2014 Version control with
  2. Matthew.... @matthewmccull ‣Open source contributor ‣O'Reilly Git Video Co-instructor ‣Co-Author

    of O'Reilly's Git book ‣5-year Git trainer ‣Instructor at GitHub
  3. http://oreil.ly/ogitvid

  4. http://amzn.to/oreillygit

  5. Version Control A refreshed approach to VCS

  6. None
  7. Open Source

  8. bash scripts ☛ C code

  9. is not a slightly better

  10. None
  11. None
  12. None
  13. http://git-scm.com

  14. Starting Up Creating a repository

  15. Get a GitHub account.

  16. Get a GitHub account. http://github.com/join

  17. Create a new repo(sitory).

  18. Add a file.

  19. View the commit history (timeline).

  20. Make changes to the file.

  21. Repo Creation Local and remote initialization simplicity

  22. # Green field project! $ git init newproject! $ cd

    newproject! # ...start coding
  23. or if you already have source code

  24. # Legacy project tree! $ cd existingproject! $ git init!

    ! # Add all the code! $ git add .! $ git commit -m”Initial import”

  25. ‣ Blob ‣ Tree ‣ Commit ‣ Tag

  26. tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob:

    8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit 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
  27. Collaborating Two authors

  28. Make simultaneous changes to the file.

  29. Collaborating Redux Untrusted collaborators

  30. Untrusted changes to the file.

  31. Changelist Three stage thinking

  32. Working Staging Repo add commit edit

  33. None
  34. ‣shopping cart ‣ put things in ‣ take things out

    ‣ purchase at register
  35. v1 v2 v3 v4 File A File B File C

    File A File B File B File C v5 File A File B File B File A File A File C File C File C
  36. Workspaces The power of simple branch toggling

  37. Local Remote Upstream

  38. # Creating a branch! git branch <BRANCHNAME>

  39. RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit

    8c2d1 commit 1bdcd commit 2daa1
  40. What do cheap branches enable?

  41. ‣ Experimentation ‣


  42. ‣ Experimentation ‣ Safe experimentation

  43. Better reuse of units of work

  44. Work Models Enabling different development styles

  45. product v1.0 integration story1 story2 v1.5 integration story3

  46. Local Remote Upstream Integ Product Integ Product Integ Product

  47. Local Remote Upstream Idea Story Feature Feature Feature Integ Product

    Integ Product Integ Product
  48. Local Remote Upstream Idea Story Feature Feature Feature Integ Product

    Integ Product Integ Product
  49. Central Repo C e n t r a l i

    z e d
  50. Blessed Repo D i c t a t o r

    s h i p
  51. Certified Repo Development Repo t e g r a t

    i o n M a n a g e d Continuous
 Integration
 Server
  52. C u s t o m + P u b

    l i c C o n t r i b Customized ☚ Private Public ☛ GitHub
  53. Mirror Development Repo M i r r o r e

    d Mirror Certified Repo
  54. Client Apps GUIs and other front-ends

  55. http://windows.github.com

  56. http://windows.github.com

  57. http://mac.github.com

  58. http://mac.github.com

  59. Remotes Bandwidth and geographic challenges

  60. Local Remote Upstream

  61. Local Remote Upstream

  62. Local Remote Upstream

  63. data from http://whygitisbetterthanx.com/#git-is-fast Init git svn Status git svn Diff

    git svn Tag git svn Log git svn Commit (Lg) git svn Commit (Sm) git svn Branch git c svn c Speed
  64. Local Remote Upstream commit fetch push clone clone clone push

    pull pull pull
  65. Commit Push Pull

  66. Commit Push Pull

  67. Commit Push Pull

  68. Integration CI, scripting, and hooks

  69. None
  70. "This is so important, we can't entrust it to automation.

    We need our top developer to supervise it."
  71. continuous integration servers jenkins travis ci circleci buildhive

  72. None
  73. None
  74. None
  75. None
  76. None
  77. Summary The Git and GitHub ecosystem

  78. education@github.com education.github.com @matthewmccull Q&A

  79. • http://education.github.com • education@github.com
 • http://git-scm.com/book • http://training.github.com Resources