Git with t for teams

14,949 views
12,182 views

Published on

Git is not just a version control system. Git can change the way you interact with your team members. Lot’s of teams don’t think about reflecting their development workflow in Git and just use it out-of-the-box. Git, however, can be much more powerful, giving your team a boost in productivity, protecting your delivery pipeline and helping you to work better together.

In this session we will start with a central workflow that is used by a lot of Subversion teams. You will learn how to practically integrate ALM solutions like continuous deployment, code reviews, change tracking and much more into your individual workflow. You will find out how to protect your master branch from accidental commits, broken builds and unreviewed code. This presentation will help you discover the best way to work together as a team – whether you’re yet to migrate to Git or even an experienced Git user.

Published in: Technology

Git with t for teams

  1. GIT WITH T FOR TEAM @svenpet
  2. SVN
  3. GIT
  4. MERCURIAL
  5. CVS
  6. ANYTHING ELSE TFS Perforce ClearCase VSS
  7. NO VCS you must love pain AT ALL?
  8. WHY IS GIT GOOD*? CHEAP BRANCHING EVERYTHING IS LOCAL GIT IS FAST GIT IS SMALL THE STAGING AREA DISTRIBUTED GITHUB & BITBUCKET GIT IS THE NEW STANDARD HUGE COMMUNITY * from Lemi Orhan Ergin
  9. WHY IS GIT GOOD*? CHEAP BRANCHING EVERYTHING IS LOCAL GIT IS FAST GIT IS SMALL THE STAGING AREA DISTRIBUTED GITHUB & BITBUCKET WORKFLOW CAPABILITIES GIT IS THE NEW STANDARD HUGE COMMUNITY * from Lemi Orhan Ergin
  10. MASTER RELEASE VERSION 1.9 DETAILED VIEW
  11. BIRDS VIEW
  12. NED SIG DE PEN RO FO CE OUR S
  13. DISTRIBUTED WORKFLOW
  14. CENTRALIZED WORKFLOW companies like those
  15. Sven Peters ATLASSIAN AMBASSADOR @svenpet http://svenpet.com
  16. Can we do a fast Can we fix a bug for the upcoming RELEASE ? HOTFIX for the current version? Can we BUILD the current code ? Is the code for that FEATUREcomplete? Has everybody REVIEWED the code for this feature ?
  17. I FIND YOUR LACK OF WORKFLOW STRUCTURE DISTURBING
  18. DIFFERENT PEOPLE PRODUCTS CULTURES
  19. DIFFERENT PEOPLE PRODUCTS CULTURES JIRA, Bitbucket, Stash
  20. DIFFERENT PEOPLE PRODUCTS CULTURES
  21. DIFFERENT PEOPLE PRODUCTS CULTURES DIFFERENT WORKFLOWS
  22. BUILD YOUR fork WORKFLOW push rebase merge pull clone
  23. BUILD YOUR WORKFLOW Git
  24. ONE WORKFLOW: NOT POSSIBLE WITH GIT
  25. block files while working on it
  26. we know what can happen!
  27. FORK WORKFLOWS
  28. MAKES A COPY OF A REPOSITORY ON THE SERVER YOU CAN NOT WRITE DIRECTLY TO THE ORIGINAL REMOTE REPOSITORY YOU CAN STILL GET CHANGES FROM THE ORIGINAL REMOTE REPOSITORY forking rocks!
  29. THE GATEKEEPER WORKFLOW for teams
  30. REPOSITORY it's such an awesome library
  31. REPOSITORY FORK FORKED REPOSITORY
  32. REPOSITORY SYNCH FORKED REPOSITORY Get updates on request or automatically* * with awesome tools like Stash or with Git hooks
  33. REPOSITORY FORK FORKED REPOSITORY I've done an awesome change
  34. REPOSITORY X PUSH CHANGE FORKED REPOSITORY
  35. REPOSITORY he is the gatekeeper FORKED REPOSITORY can you pull in my changes?
  36. REPOSITORY PULL CHANGES likes the changes FORKED REPOSITORY
  37. LOOKS LIKE AN OPEN SOURCE PROCESS? exactly and it works great!
  38. LEARN FROM DISTRIBUTED TEAMS OPEN SOURCE TEAMS? FLEXIBLE ROADMAPS DIFFERENT PROGRAMMING SKILLS
  39. FORKING IN THE ENTERPRISE
  40. 5 REASONS FOR... FORKING IN THE ENTERPRISE
  41. FORKING IN THE ENTERPRISE REASON 1 GREAT FOR CUSTOMIZING LIBRARIES and still get bug fixes
  42. FORKING IN THE ENTERPRISE REASON 2 GREAT FOR INNOVATION SPIKES and maybe add it later
  43. FORKING IN THE ENTERPRISE but still be open for changes REASON 3 PROTECTING YOUR COMPONENTS
  44. FORKING IN THE ENTERPRISE REASON 4 REDUCE THE NOISE and keep the overview for huge projects
  45. FORKING IN THE ENTERPRISE REASON 5 INTERACTION WITH CONTRACTORS & INTERNS protect your sources
  46. THE DICTATORS & LIEUTENANTS WORKFLOW
  47. an army of developer
  48. a few integrator
  49. and a friendly dictator
  50. BLESSED REPOSITORY FORKED REPOSITORY FORKED REPOSITORY SYNCH
  51. BLESSED REPOSITORY FORKED REPOSITORY FORKED REPOSITORY Pull
  52. BLESSED REPOSITORY FORKED REPOSITORY FORKED REPOSITORY too much stuff! X Pull
  53. BLESSED REPOSITORY FORKED REPOSITORY FORKED REPOSITORY Pull FORKED REPOSITORY Pull FORKED REPOSITORY Pull
  54. We are here to help! FORKED REPOSITORY FORKED REPOSITORY Pull FORKED REPOSITORY Pull FORKED REPOSITORY BLESSED REPOSITORY Pull
  55. GREAT FOR HUGE PROJECTS
  56. THIS IS A POTENTIAL BOTTLENECK
  57. YOU NEED MORE FREEDOM? AND WANT TO MOVE FAST?
  58. THE CENTRALIZED WORKFLOW
  59. HELLO SUBVERSION USERS! FLOW THIS IS YOUR but Git makes it even better
  60. master ONE BRANCH TO RULE THEM ALL all code goes in here
  61. CENTRAL REPOSITORY CLONED REPOSITORY your (full) local copy for development
  62. CENTRAL REPOSITORY everybody integrate changes here CLONED REPOSITORY your (full) local copy for development
  63. CENTRAL REPOSITORY do that often! CLONED REPOSITORY
  64. SIMPLE & EASY TO LEARN +CI = ALWAYS DEPLOYABLE CONFLICTS GET VISIBLE EARLY USED FOR YEARS
  65. GREAT FOR MIGRATING don't change too much at once
  66. UNFINISHED FEATURES
  67. FEATURE TOGGLES
  68. THE FEATURE BRANCH WORKFLOW
  69. WE ORGANIZE WORK IN TASKS, STORIES, FEATURES WHY NOT HAVE THAT IN CODE, TOO?
  70. master BRANCH PER FEATURE Feature 2 Feature 1 1 to X devs working on a branch
  71. master BRANCH PER FEATURE get closed when done Feature 2 Feature 1
  72. CLEAN MASTER BRANCH
  73. ISOLATED FEATURE DEVELOPMENT
  74. GREAT FOR FIXED TIME / FIXED FEATURE DEVELOPMENT develop while bugfix
  75. GREAT FOR CONTINUOUS DELIVERY deliver when done
  76. master FEATURE BRANCH TIPS merge frequently
  77. master FEATURE BRANCH TIPS synch with MASTER frequently
  78. master FEATURE BRANCH TIPS delete branch when done
  79. master BRANCH PER FEATURE Feature 2 Feature 1 useful branch names
  80. master DELETE USER BRANCH PER FEATURE ADD USER useful branch names
  81. J-98 DELETE USER master BRANCH PER FEATURE J-60 ADD USER use key from issue tracker
  82. THE FEATURE BRANCH WORKFLOW with code reviews
  83. FEEL BETTER LEARN BETTER QUALITY BLAME WHY DO YOU WANT TO DISCUSS YOUR CODE CHANGES?
  84. PULL REQUESTS <> +
  85. master Pull Request what do you think?
  86. master Pull Request discuss changes GOOD! AGREE!
  87. master Pull Request approve changes
  88. master Pull Request merge
  89. THE *SOURCE: ZACH HOLMAN "HOW GITHUB WORKS" WORKFLOW *
  90. THE FEATURE BRANCH WORKFLOW with history
  91. DON'T FORGET YOUR PAST
  92. master DEVELOP HISTORY new branch called DEVELOP
  93. master DEVELOP HISTORY we integrate changes here Feature
  94. master DEVELOP V. 1 . 1 HISTORY and tag our releases here Feature
  95. master DEVELOP V. 1 . 1 HISTORY makes this branch stable Feature
  96. THE WORKFLOW
  97. STAGING Production THE WORKFLOW upcoming version only through Pull Request (except when not) never direct integration... just for hotfixes
  98. STAGING Production THE WORKFLOW without Pull Request we create a HOTFIX branch (of course) and also merge to STAGING-Branch
  99. THE RELEASE WORKFLOW
  100. COOL STUFF WE'RE FLOWING!
  101. inspect your release candidate RELEASE CANDIDATES
  102. inspect your release candidate ...and don't destroy your flow RELEASE CANDIDATES
  103. RELEASE CANDIDATE DEVELOP master RELEASE other dev teams "flow" here release team works here feature complete
  104. RELEASE CANDIDATE DEVELOP master RELEASE fixing back to DEVELOP
  105. RELEASE CANDIDATE DEVELOP 1 V. 1 . master RELEASE merge, tag, release!
  106. RELEASES ARE EXPENSIVE BUGS HAVE A BIG IMPACT PROMISED SET OF FEATURES ALLY NTI Y E POT READ AFRAID OF FAILURES
  107. THE MAINTENANCE WORKFLOW
  108. RELEASED SOFTWARE HAS BUGS Houston we have a problem
  109. 1.1 hotfix DEVELOP master MAINTENANCE branch from MASTER and fix the damn bug
  110. 1.1 hotfix 1.2 .1 DEVELOP master MAINTENANCE merge with MASTER, tag and release
  111. 1.1 hotfix 1.2 .1 DEVELOP master MAINTENANCE merge with DEVELOP and delete HOTFIX
  112. 1.1 hotfix DEVELOP 1.1 .2 RC - 1.2 master MAINTENANCE ONE E XCEPT A REL ION: EASE BRAN CH EX ISTS
  113. THE GITFLOW
  114. YOU'VE JUST SEEN IT!
  115. DEVELOP & MASTER BRANCH THE GITFLOW from Vincent Driessen FEATURE BRANCHES RELEASE BRANCHES MAINTENANCE BRANCHES
  116. HOW CAN I FIND MY WAY THROUGH THE RULE JUNGLE? USE T OOLS
  117. HOW CAN I REMEMBER ALL THESE GIT COMMANDS AND RULES? git flow feature start 'JRA-34 Add User' git flow feature finish 'JRA-34 Add User' git flow release start 1.6 git flow hotfix finish 1.5.3 there is a command line tool
  118. HOW CAN I REMEMBER ALL THESE GIT COMMANDS AND RULES?
  119. WHY GITFLOW I thought every team is different?
  120. WHY GITFLOW IT CAPTURES A LOT OF DEVELOPMENT SITUATIONS IT'S WELL KNOWN: EASY ADOPTION BUT I WON'T USE IT OUT-OF-THE-BOX: ADAPT IT!
  121. THE STASH TEAM FLOW at Atlassian
  122. MAKING GITFLOW MORE SIMPLE getting rid of MASTER
  123. KEEP YOUR RELEASE BRANCH no merge into MASTER needed
  124. DEVELOP 2.1 STASH TEAM FLOW RELEASE 2.1 no MASTER, we keep RELEASE
  125. DEVELOP RELEASE 2.1 2.1 hotfix 2.1.1 STASH TEAM FLOW branch HOTFIX from RELEASE and fix the damn bug
  126. RELEASE 2.1 2.1 .1 2.1 hotfix 2.1.1 DEVELOP STASH TEAM FLOW merge back to RELEASE
  127. DEVELOP hotfix 2.1.1 2.1 .1 STASH TEAM FLOW RELEASE 2.1 2.1 and apply changes to DEVELOP
  128. they are still out there ...and have sometimes problems SUPPORTING OLD VERSIONS
  129. STASH TEAM FLOW DEVELOP RELEASE 2.1 RELEASE 2.0 we need to fix a bug in 2.0
  130. DEVELOP RELEASE 2.1 RELEASE 2.0 hotfix 2.0.1 STASH TEAM FLOW you've seen this before
  131. hotfix 2.0.1 STASH TEAM FLOW DEVELOP RELEASE 2.1 RELEASE 2.0 merge with 2.1 RELEASE branch
  132. hotfix 2.0.1 STASH TEAM FLOW DEVELOP RELEASE 2.1 RELEASE 2.0 and apply changes from RELEASE 2.1 to DEVELOP
  133. STASH TEAM FLOW can change tomorrow
  134. STASH TEAM FLOW We want to help
  135. RELEASE 2.1 2.1 .1 2.1 hotfix 2.1.1 I could do this DEVELOP
  136. I could do this SERVER SIDE AUTO MERGES with Git hooks
  137. LEAN BACK AND ENJOY PURE AWESOMENESS
  138. DEVELOP RELEASE 2.1 RELEASE 2.0 hotfix 2.0.1 STASH TEAM FLOW merge here
  139. hotfix 2.0.1 STASH TEAM FLOW DEVELOP RELEASE 2.1 RELEASE 2.0 and let the robots take over
  140. NOT ENOUGH POSSIBILITIES?
  141. INFINITE WORKFLOW POSSIBILITIES
  142. CUSTOMIZE YOUR WORKFLOW WITH HOOKS
  143. PUSH
  144. PUSH Script is doing some stuff
  145. PUSH
  146. an si At la s at WATCH OUT: HOOK MAGIC
  147. 1 DON'T BRANCH FROM A RED BUILD
  148. 1 DON'T BRANCH FROM A RED BUILD
  149. 2 BE INFORMED Chat
  150. 2 BE INFORMED
  151. WORKFLOWS WITH CI SERVERS Continuous Integration
  152. WE WANT STABLE DEVELOP BRANCH THAT IS CI TESTED to be sure, that we won't break things
  153. WE COULD PULL CHANGES BUILD LOCALLY MERGE IF OK
  154. WE COULD MERGE & PRAY
  155. WHY NOT USE AUTO MERGE ON FEATURE BRANCHES ? and build it from there!
  156. DEVELOP AUTO MERGES potential integration problem
  157. DEVELOP AUTO MERGES pull frequently
  158. DEVELOP AUTO MERGES pull frequently automatically on commits
  159. SOMETIMES WHEN MERGING SHIT HAPPENS. AND SOMEBODY PUSHES BUGGY CODE TO DEVELOP
  160. DEVELOP GREEN BUILD MERGES push automatically on green builds of DEVELOP
  161. POOR CI ADMINISTRATOR setting up builds for all these tasks
  162. AUTO DETECT BRANCHES
  163. AUTO DETECT BRANCHES
  164. BUILD ON EVERY COMMIT KILLED OUR CI SERVERS x features branches * x pushes a day = server overload
  165. BUILD ON EVERY COMMIT ON MASTER, RELEASE & DEVELOP BUILD MANUALLY ON FEATURE BRANCHES DOING AUTO MERGES ON GREEN BUILDS OF DEVELOP
  166. WORKFLOWS WITH ISSUE TRACKING
  167. DIFFERENT PEOPLE HAVE DIFFERENT VIEWS ON YOUR PROJECT amazing scrum master cool developers incredible product owner
  168. ISSUE TRACKERS CONNECT US CODERS WITH THE REAL WORLD amazing scrum master cool developers incredible product owner
  169. ISSUE TRACKERS CONNECTS GIT WITH THE REAL WORLD amazing scrum master cool developers incredible product owner
  170. WE LIVE IN CODE! LET ME WORK IN CODE I JUST NEED TO KNOW WHAT MY CODE SHOULD SOLVE!
  171. HOW DO ISSUE TRACKERS CONNECT TO THE CODE? Problem understood, I start coding
  172. HOW DO ISSUE TRACKERS CONNECT TO THE CODE? Ah good, the coders started
  173. HOW DO ISSUE TRACKERS CONNECT TO THE CODE? commit -m "fixes #6, resolve ticket #5"
  174. HOW DO ISSUE TRACKERS CONNECT TO THE CODE? commit -m "fixes #6, resolve ticket #5"
  175. WHAT'S IN IT FOR ? non geeks SEE WHAT'S IN DEVELOP SEE ISSUES IN REVIEW SEE FINISHED ISSUES ALREADY MERGED WITH DEVELOP
  176. WHAT'S IN IT FOR ? DOING CODE REVIEWS IN CONTEXT BROWSING FEATURE DESCRIPTIONS SHOW CODE CHANGES
  177. ... I HAVE A DREAM
  178. GIT WORKFLOW 'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH DOING A PULL REQUEST MARKS THE ISSUE 'IN REVIEW' MERGING A FEATURE BRANCH MARKS THE ISSUE AS 'RESOLVED'
  179. ISSUE WORKFLOW 'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH DOING A PULL REQUEST MARKS THE ISSUE 'IN REVIEW' MERGING A FEATURE BRANCH MARKS THE ISSUE AS 'RESOLVED'
  180. 'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH DOING A PULL REQUEST MARKS THE ISSUE 'IN REVIEW' MERGING A FEATURE BRANCH MARKS THE ISSUE AS 'RESOLVED'
  181. GIT COMBINED ISSUE WORKFLOW 'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH DOING A PULL REQUEST MARKS THE ISSUE 'IN REVIEW' MERGING A FEATURE BRANCH MARKS THE ISSUE AS 'RESOLVED'
  182. RISE GIT TOOLS OF THE
  183. DON'T FLOW LIKE IT'S 1999
  184. THANKS DON'T US TOMORRO W 3PM E GIT ROOM 7 svenpet.com/talks @svenpet
  185. Resources RESOURCES GIT WORKFLOWS AUTO MERGES GIT RESOURCES FORKS & UPSTREAMS https://www.atlassian.com/git/workflows http://blogs.atlassian.com/2013/05/git-automatic-merges-with-server-side-hooks-for-the-win/ https://www.atlassian.com/git/resources https://blogs.atlassian.com/2013/07/git-upstreams-forks/
  186. PICTURES http://www.flickr.com/photos/43322231@N07/4390305784/  http://www.flickr.com/photos/40011478@N00/2890078135/ http://www.flickr.com/photos/33909206@N04/7638306424  http://www.flickr.com/photos/8340753@N04/501465437/  http://www.flickr.com/photos/33774513@N08/3510825685/ http://www.flickr.com/photos/55723329@N00/3631928376/  http://www.flickr.com/photos/11389536@N03/5235804240/  http://www.flickr.com/photos/43322231@N07/5410534167  http://www.flickr.com/photos/43322231@N07/5366609719  http://www.flickr.com/photos/43322231@N07/4205372249/ http://www.flickr.com/photos/43322231@N07/4466599835/  http://www.flickr.com/photos/45940879@N04/5598027415/  http://www.flickr.com/photos/83346641@N00/3517813158/  http://www.flickr.com/photos/80384851@N00/2653886484/ http://www.flickr.com/photos/21461615@N00/1353110751  http://www.flickr.com/photos/82402697@N00/449512594  http://www.flickr.com/photos/7228825@N05/675810372  http://www.flickr.com/photos/38451115@N04/4016842259/ http://www.flickr.com/photos/8749778@N06/5601758699/  http://www.flickr.com/photos/37831703@N00/3391877877  http://www.flickr.com/photos/60648084@N00/2900765643/  http://www.flickr.com/photos/28415633@N00/8401940159 http://www.flickr.com/photos/41304517@N00/6814372181  http://www.flickr.com/photos/99796131@N00/120468504/  http://www.flickr.com/photos/92269745@N00/4612732045/  http://www.flickr.com/photos/57768341@N00/3800568262/

×