Post on 10-May-2015
description
transcript
Branching over the Top!By Pascal van der Horst
2
Branches
• What is Branching and Merging?• Why Branching?• When Branching?• Branch Plans• Branch Examples
• Demo
3
What is Branching and Merging?
Branching is the duplication of an object under revision control so that modifications can happen in parallel along both branches.
Merging is the act of reconciling multiple changes made to different copies of the same file. Most often, it is necessary when a file is modified by two people on two different computers at the same time. Later, these changes are merged, resulting in a single new file that contains both sets of changes.
4
Why Branching?
Branching …• makes software agile • increases the maintainability
5
When Branching?
• Release Isolation
• Feature Isolation
• Team Isolation
• Integration Isolation
6
Branching Plans
• Basic Branch Plan
• Standard Branch Plan
• Advanced Branch Plan
7
Basic Branch Plan
DEVELOPMENT
MAIN
Bra
nch
RELEASE
Bra
nch
DevelopmentDevelopment
Production /Release
Production /Release
8
Standard Branch Plan
DEVELOPMENT
MAIN
Bra
nch
SERVICE PACK
RELEASE
Bra
nch
DevelopmentDevelopment
Production /Release
Production /Release
Bra
nch
9
Advanced Branch Plan
DEVELOPMENT
MAIN
Bra
nch
SERVICE PACK
HOT FIX
RELEASE
Bra
nch
Bra
nch
DevelopmentDevelopment
Production /Release
Production /Release
Bra
nch
10
Branch Example (Single Release)
DEV
MAIN
Bra
nch
RELEASE
Bra
nch
DevelopmentDevelopment
Production /Release
Production /Release
V1.1 (start)
V1.0Production
Release 1.01
RIV1,0 Hotfix 1 F
I RI
V1.1
FI
11
Branch Example (Single Team)
DEV
Bra
nch
FI
V1.1 (start) V1.1 FT3
RI
V1.1 (bug fix)
FI
V1.1
FI
V1.2
RI
V1.2
CI / Nightly Builds(Early validation)CI / Nightly Builds(Early validation)
Nightly Build(Early Validation)
Nightly Build(Early Validation)
V1.0Production
11 22
33 44 55
66 77
88
12
Branch Example (Multi Team)
DEV FT1
MAIN
Bra
nch
RI
PRODUCTION
V1.0.1
FI
V1.1 (Release)
V1.0 (hotfix)
V1.1 Golden
DEV FT2
DEV FT3
Bra
nch
V1.1 FT2
V1.1 FT1
RI
RI
RI
Bra
nch
Bra
nch
FI
V1.1 FT2 (start)
V1.1 FT1
BM
V1.0
13
Branch Example (Feature)
FEATURE 1
TEAM 1
RELEASE 1
MAIN
Bra
nch
FEATURE 2
TEAM 2
Bra
nch
Bra
nch
Bra
nch
RI
RI
RI
11
22
33
22
44
55
55
66 66
77
The two DEV branches are
created as sequential tasks, but as one unit of
work.
The two DEV branches are
created as sequential tasks, but as one unit of
work.
The Reverse Integration tasks are sequential
tasks, but created as two units of work
The Reverse Integration tasks are sequential
tasks, but created as two units of work
14
Branch Example (Hotfix, Servicepack)
Bra
nch
DEV-1
DEV …
MAIN
R1 (SP)
RTM
Bra
nch
Bra
nch
Bra
nch
When MAIN is ready to release, create the
SERVICE PACK, HOT FIX, and RELEASE
branches at the same time.
When MAIN is ready to release, create the
SERVICE PACK, HOT FIX, and RELEASE
branches at the same time.
The RTM branch is a read-only copy of
what was released
The RTM branch is a read-only copy of
what was released
Bra
nch
Bra
nch
Bra
nch
Bra
nch
Bra
nch
SERVICE PACK
R2 (SP)
HOT FIX
R1 (SP0) R1 (SP1)
R1 (SP0) R1 (SP1)
R2 (SP0)
R2 (SP0)
FI
11
22
22
33
44
55
66
77
88
The two DEV branches are
created as sequential tasks, but as one unit of
work.
The two DEV branches are
created as sequential tasks, but as one unit of
work.
15
Demo
16
Vragen