0
GIT
WITH T FOR

TEAM
@svenpet
SVN
GIT
MERCURIAL
CVS
ANYTHING ELSE
TFS

Perforce

ClearCase

VSS
NO VCS
you must love pain

AT ALL?
WHY IS

GIT

GOOD*?

CHEAP BRANCHING
EVERYTHING IS LOCAL
GIT IS FAST
GIT IS SMALL
THE STAGING AREA
DISTRIBUTED
GITHUB & BI...
WHY IS

GIT

GOOD*?

CHEAP BRANCHING
EVERYTHING IS LOCAL
GIT IS FAST
GIT IS SMALL
THE STAGING AREA
DISTRIBUTED
GITHUB & BI...
MASTER

RELEASE
VERSION 1.9

DETAILED VIEW
BIRDS VIEW
NED
SIG
DE

PEN
RO
FO

CE
OUR
S
DISTRIBUTED WORKFLOW
CENTRALIZED
WORKFLOW
companies like those
Sven Peters

ATLASSIAN AMBASSADOR

@svenpet
http://svenpet.com
Can we do a fast
Can we fix a bug for the upcoming

RELEASE ?

HOTFIX for the current version?
Can we

BUILD the current c...
I FIND YOUR LACK OF

WORKFLOW STRUCTURE

DISTURBING
DIFFERENT
PEOPLE
PRODUCTS
CULTURES
DIFFERENT
PEOPLE
PRODUCTS
CULTURES

JIRA, Bitbucket, Stash
DIFFERENT
PEOPLE
PRODUCTS
CULTURES
DIFFERENT
PEOPLE
PRODUCTS
CULTURES

DIFFERENT
WORKFLOWS
BUILD YOUR

fork

WORKFLOW
push

rebase
merge
pull
clone
BUILD YOUR

WORKFLOW
Git
ONE WORKFLOW:

NOT POSSIBLE WITH GIT
block files while working on it
we know what can happen!
FORK WORKFLOWS
MAKES A COPY OF A REPOSITORY ON THE SERVER
YOU CAN NOT WRITE DIRECTLY TO THE ORIGINAL REMOTE REPOSITORY
YOU CAN STILL GET ...
THE GATEKEEPER WORKFLOW
for teams
REPOSITORY

it's such an awesome library
REPOSITORY

FORK

FORKED
REPOSITORY
REPOSITORY

SYNCH

FORKED
REPOSITORY

Get updates on request or automatically*

* with awesome tools like Stash or with Gi...
REPOSITORY

FORK

FORKED
REPOSITORY

I've done an awesome change
REPOSITORY

X

PUSH CHANGE

FORKED
REPOSITORY
REPOSITORY

he is the gatekeeper

FORKED
REPOSITORY

can you pull in my changes?
REPOSITORY

PULL CHANGES

likes the changes

FORKED
REPOSITORY
LOOKS LIKE AN

OPEN SOURCE PROCESS?
exactly and it works great!
LEARN FROM
DISTRIBUTED TEAMS

OPEN SOURCE TEAMS?
FLEXIBLE ROADMAPS

DIFFERENT PROGRAMMING SKILLS
FORKING IN THE

ENTERPRISE
5 REASONS FOR...

FORKING IN THE

ENTERPRISE
FORKING IN THE

ENTERPRISE
REASON 1

GREAT FOR CUSTOMIZING LIBRARIES
and still get bug fixes
FORKING IN THE

ENTERPRISE
REASON 2

GREAT FOR INNOVATION SPIKES
and maybe add it later
FORKING IN THE

ENTERPRISE
but still be open for changes

REASON 3

PROTECTING YOUR COMPONENTS
FORKING IN THE

ENTERPRISE
REASON 4

REDUCE THE NOISE
and keep the overview for huge projects
FORKING IN THE

ENTERPRISE
REASON 5

INTERACTION WITH CONTRACTORS & INTERNS
protect your sources
THE

DICTATORS &
LIEUTENANTS

WORKFLOW
an army of developer
a few
integrator
and a friendly
dictator
BLESSED
REPOSITORY

FORKED
REPOSITORY

FORKED
REPOSITORY

SYNCH
BLESSED
REPOSITORY

FORKED
REPOSITORY

FORKED
REPOSITORY

Pull
BLESSED
REPOSITORY

FORKED
REPOSITORY

FORKED
REPOSITORY

too much stuff!

X
Pull
BLESSED
REPOSITORY

FORKED
REPOSITORY

FORKED
REPOSITORY

Pull

FORKED
REPOSITORY

Pull

FORKED
REPOSITORY

Pull
We are here to help!
FORKED
REPOSITORY

FORKED
REPOSITORY

Pull

FORKED
REPOSITORY

Pull

FORKED
REPOSITORY

BLESSED
REPOS...
GREAT FOR HUGE PROJECTS
THIS IS A POTENTIAL BOTTLENECK
YOU NEED MORE FREEDOM?
AND WANT TO MOVE FAST?
THE CENTRALIZED WORKFLOW
HELLO SUBVERSION USERS!

FLOW

THIS
IS
YOUR
but Git makes
it even better
master

ONE BRANCH
TO RULE THEM ALL
all code goes in here
CENTRAL
REPOSITORY

CLONED
REPOSITORY

your (full) local copy for
development
CENTRAL
REPOSITORY

everybody integrate changes here

CLONED
REPOSITORY

your (full) local copy for
development
CENTRAL
REPOSITORY

do that often!

CLONED
REPOSITORY
SIMPLE & EASY TO LEARN

+CI = ALWAYS DEPLOYABLE

CONFLICTS GET VISIBLE EARLY

USED FOR YEARS
GREAT FOR MIGRATING
don't change too much at once
UNFINISHED

FEATURES
FEATURE TOGGLES
THE

FEATURE
BRANCH

WORKFLOW
WE ORGANIZE WORK IN TASKS, STORIES, FEATURES

WHY NOT HAVE THAT IN CODE, TOO?
master

BRANCH PER FEATURE

Feature 2
Feature 1

1 to X devs working on a branch
master

BRANCH PER FEATURE
get closed when done

Feature 2
Feature 1
CLEAN MASTER BRANCH
ISOLATED FEATURE DEVELOPMENT
GREAT

FOR FIXED TIME / FIXED FEATURE DEVELOPMENT

develop while bugfix
GREAT

FOR CONTINUOUS DELIVERY
deliver when done
master

FEATURE BRANCH TIPS
merge frequently
master

FEATURE BRANCH TIPS
synch with MASTER frequently
master

FEATURE BRANCH TIPS
delete branch when done
master

BRANCH PER FEATURE

Feature 2
Feature 1

useful branch names
master
DELETE
USER

BRANCH PER FEATURE
ADD
USER
useful branch names
J-98
DELETE
USER

master

BRANCH PER FEATURE
J-60
ADD
USER
use key from issue tracker
THE

FEATURE
BRANCH

WORKFLOW
with code reviews
FEEL BETTER
LEARN
BETTER QUALITY

BLAME

WHY DO YOU WANT TO DISCUSS
YOUR CODE CHANGES?
PULL
REQUESTS
<>

+
master

Pull Request
what do you think?
master

Pull Request
discuss changes

GOOD!
AGREE!
master

Pull Request
approve changes
master

Pull Request
merge
THE
*SOURCE: ZACH HOLMAN "HOW GITHUB WORKS"

WORKFLOW

*
THE

FEATURE
BRANCH

WORKFLOW
with history
DON'T FORGET YOUR PAST
master DEVELOP

HISTORY
new branch called DEVELOP
master DEVELOP

HISTORY
we integrate changes here

Feature
master DEVELOP

V. 1
.

1

HISTORY
and tag our releases here

Feature
master DEVELOP

V. 1
.

1

HISTORY
makes this branch stable

Feature
THE

WORKFLOW
STAGING

Production

THE

WORKFLOW
upcoming version
only through Pull Request
(except when not)

never direct integration....
STAGING

Production

THE

WORKFLOW
without Pull Request

we create a HOTFIX branch (of course)
and also merge to STAGING-B...
THE RELEASE WORKFLOW
COOL STUFF
WE'RE FLOWING!
inspect your release candidate

RELEASE CANDIDATES
inspect your release candidate
...and don't destroy your flow

RELEASE CANDIDATES
RELEASE CANDIDATE

DEVELOP

master

RELEASE
other dev teams "flow" here
release team works here

feature complete
RELEASE CANDIDATE
DEVELOP

master

RELEASE

fixing back to DEVELOP
RELEASE CANDIDATE

DEVELOP

1

V. 1
.

master

RELEASE

merge, tag, release!
RELEASES ARE
EXPENSIVE
BUGS HAVE A BIG
IMPACT

PROMISED SET
OF FEATURES

ALLY
NTI Y
E
POT READ

AFRAID OF
FAILURES
THE MAINTENANCE WORKFLOW
RELEASED SOFTWARE HAS BUGS
Houston we have a problem
1.1

hotfix

DEVELOP

master

MAINTENANCE

branch from MASTER and fix
the damn bug
1.1

hotfix

1.2

.1

DEVELOP

master

MAINTENANCE
merge with MASTER, tag and
release
1.1

hotfix

1.2

.1

DEVELOP

master

MAINTENANCE
merge with DEVELOP and
delete HOTFIX
1.1

hotfix

DEVELOP

1.1

.2

RC - 1.2

master

MAINTENANCE
ONE E
XCEPT
A REL
ION:
EASE
BRAN
CH EX
ISTS
THE GITFLOW
YOU'VE JUST SEEN IT!
DEVELOP & MASTER BRANCH

THE GITFLOW
from Vincent Driessen

FEATURE BRANCHES
RELEASE BRANCHES
MAINTENANCE BRANCHES
HOW CAN I FIND MY WAY THROUGH THE

RULE JUNGLE?

USE T

OOLS
HOW CAN I REMEMBER ALL THESE

GIT COMMANDS AND RULES?
git flow feature start 'JRA-34 Add User'
git flow feature finish 'JR...
HOW CAN I REMEMBER ALL THESE

GIT COMMANDS AND RULES?
WHY

GITFLOW
I thought every team is different?
WHY

GITFLOW

IT CAPTURES A LOT OF DEVELOPMENT SITUATIONS
IT'S WELL KNOWN: EASY ADOPTION

BUT

I WON'T USE IT OUT-OF-THE-B...
THE STASH TEAM FLOW
at Atlassian
MAKING

GITFLOW MORE SIMPLE
getting rid of MASTER
KEEP YOUR

RELEASE
BRANCH

no merge into MASTER needed
DEVELOP
2.1

STASH TEAM FLOW

RELEASE 2.1

no MASTER, we keep RELEASE
DEVELOP
RELEASE 2.1

2.1

hotfix 2.1.1

STASH TEAM FLOW

branch HOTFIX from RELEASE
and fix the damn bug
RELEASE 2.1
2.1

.1

2.1

hotfix 2.1.1

DEVELOP

STASH TEAM FLOW

merge back to RELEASE
DEVELOP
hotfix 2.1.1

2.1

.1

STASH TEAM FLOW

RELEASE 2.1

2.1

and apply changes to DEVELOP
they are still out there
...and have sometimes problems

SUPPORTING OLD VERSIONS
STASH TEAM FLOW

DEVELOP

RELEASE 2.1

RELEASE 2.0

we need to fix a bug in 2.0
DEVELOP

RELEASE 2.1

RELEASE 2.0

hotfix 2.0.1

STASH TEAM FLOW

you've seen this before
hotfix 2.0.1

STASH TEAM FLOW

DEVELOP

RELEASE 2.1

RELEASE 2.0

merge with 2.1 RELEASE branch
hotfix 2.0.1

STASH TEAM FLOW

DEVELOP

RELEASE 2.1

RELEASE 2.0

and apply changes from
RELEASE 2.1 to DEVELOP
STASH TEAM FLOW

can change tomorrow
STASH TEAM FLOW

We want to help
RELEASE 2.1
2.1

.1

2.1

hotfix 2.1.1

I could do this

DEVELOP
I could do this

SERVER SIDE
AUTO MERGES

with Git hooks
LEAN BACK AND ENJOY PURE

AWESOMENESS
DEVELOP

RELEASE 2.1

RELEASE 2.0

hotfix 2.0.1

STASH TEAM FLOW

merge here
hotfix 2.0.1

STASH TEAM FLOW

DEVELOP

RELEASE 2.1

RELEASE 2.0

and let the robots take over
NOT ENOUGH POSSIBILITIES?
INFINITE WORKFLOW POSSIBILITIES
CUSTOMIZE YOUR WORKFLOW WITH HOOKS
PUSH
PUSH
Script is doing some stuff
PUSH
an
si
At
la
s
at

WATCH OUT:
HOOK MAGIC
1 DON'T BRANCH FROM A RED BUILD
1 DON'T BRANCH FROM A RED BUILD
2 BE INFORMED

Chat
2 BE INFORMED
WORKFLOWS WITH CI SERVERS
Continuous Integration
WE WANT
STABLE DEVELOP BRANCH THAT IS CI TESTED
to be sure, that we won't break things
WE COULD
PULL CHANGES
BUILD LOCALLY
MERGE IF OK
WE COULD

MERGE & PRAY
WHY NOT USE

AUTO MERGE
ON
FEATURE BRANCHES ?
and build it from there!
DEVELOP

AUTO MERGES
potential integration problem
DEVELOP

AUTO MERGES
pull frequently
DEVELOP

AUTO MERGES
pull frequently automatically on
commits
SOMETIMES WHEN MERGING

SHIT
HAPPENS.
AND SOMEBODY PUSHES BUGGY CODE TO DEVELOP
DEVELOP

GREEN BUILD MERGES
push automatically on green
builds of DEVELOP
POOR CI ADMINISTRATOR

setting up builds for all these tasks
AUTO DETECT BRANCHES
AUTO DETECT BRANCHES
BUILD ON EVERY COMMIT KILLED OUR CI SERVERS
x features branches * x pushes a day
= server overload
BUILD ON EVERY COMMIT ON MASTER, RELEASE & DEVELOP
BUILD MANUALLY ON FEATURE BRANCHES
DOING AUTO MERGES ON GREEN BUILDS OF...
WORKFLOWS WITH

ISSUE
TRACKING
DIFFERENT

PEOPLE HAVE DIFFERENT VIEWS ON YOUR PROJECT

amazing scrum
master

cool developers
incredible product
owner
ISSUE TRACKERS CONNECT US CODERS WITH THE REAL WORLD
amazing scrum
master

cool developers
incredible product
owner
ISSUE TRACKERS CONNECTS GIT WITH THE REAL WORLD
amazing scrum
master

cool developers
incredible product
owner
WE LIVE IN CODE!
LET ME WORK IN CODE
I JUST NEED TO KNOW WHAT
MY CODE SHOULD SOLVE!
HOW DO ISSUE TRACKERS CONNECT TO THE CODE?
Problem understood,
I start coding
HOW DO ISSUE TRACKERS CONNECT TO THE CODE?
Ah good,
the coders started
HOW DO ISSUE TRACKERS CONNECT TO THE CODE?

commit -m "fixes #6, resolve ticket #5"
HOW DO ISSUE TRACKERS CONNECT TO THE CODE?

commit -m "fixes #6, resolve ticket #5"
WHAT'S IN IT FOR

?
non geeks

SEE WHAT'S IN DEVELOP
SEE ISSUES IN REVIEW
SEE FINISHED ISSUES ALREADY MERGED WITH DEVELOP
WHAT'S IN IT FOR

?

DOING CODE REVIEWS IN CONTEXT
BROWSING FEATURE DESCRIPTIONS SHOW CODE CHANGES
... I HAVE A DREAM
GIT WORKFLOW

'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH
DOING A PULL REQUEST MARKS THE ISSUE 'IN REVIEW'
MERGI...
ISSUE WORKFLOW

'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH
DOING A PULL REQUEST MARKS THE ISSUE 'IN REVIEW'
MER...
'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH
DOING A PULL REQUEST MARKS THE ISSUE 'IN REVIEW'
MERGING A FEATURE B...
GIT COMBINED ISSUE WORKFLOW

'START PROGRESS' ON AN ISSUE CREATES A FEATURE BRANCH
DOING A PULL REQUEST MARKS THE ISSUE 'I...
RISE GIT TOOLS
OF
THE
DON'T FLOW

LIKE IT'S 1999
THANKS

DON'T US

TOMORRO

W 3PM

E GIT
ROOM 7

svenpet.com/talks
@svenpet
Resources
RESOURCES
GIT WORKFLOWS
AUTO MERGES
GIT RESOURCES
FORKS & UPSTREAMS

https://www.atlassian.com/git/workflows
htt...
PICTURES
http://www.flickr.com/photos/43322231@N07/4390305784/
 http://www.flickr.com/photos/40011478@N00/2890078135/
http...
Upcoming SlideShare
Loading in...5
×

Git with t for teams

6,912

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

Transcript of "Git with t for teams"

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

    Clipping is a handy way to collect important slides you want to go back to later.

×