Version Control - Patterns and Practices

24
Version Control – Version Control – Patterns & Patterns & Practices Practices Chris Oldwood Chris Oldwood ACCU Conference 2014 ACCU Conference 2014 @chrisoldwood / @chrisoldwood / [email protected] [email protected]

description

After the text editor and programming language the next most valuable, hotly debated and often poorly used tool is probably the version control system. Some treat it as nothing more than an ad-hoc backup of their source code whilst others endeavour to create a narrative that describes the evolution of their entire software product from inception to decommission. This session takes a walk through the software development lifecycle and examines the role the source control system plays – what we store, why we store it, how we change it and then later how we reconstruct what was changed and why. We’ll look at the various forces that dictate our branching (and subsequent merging) strategies along with some of the less contentious policies we can adopt to ensure our system continues to evolve reliably whilst maintaining a traceable narrative. Despite the range of commercial and open source SCM products out there the patterns and practices I will discuss here are almost universal. For the Software Archaeologist preserving history across file/folder moves and renames is just one aspect where tool specific knowledge matters. But before we can get there we need to deal with their lack of agreement on a common vernacular…

Transcript of Version Control - Patterns and Practices

Page 1: Version Control - Patterns and Practices

Version Control – Version Control – Patterns & PracticesPatterns & Practices

Chris OldwoodChris Oldwood

ACCU Conference 2014ACCU Conference 2014

@chrisoldwood / @chrisoldwood / [email protected]@cix.co.uk

Page 2: Version Control - Patterns and Practices

Pending CommitsPending Commits

ArchitecturesArchitectures WorkspaceWorkspace BranchingBranching MergingMerging CommittingCommitting BuildingBuilding LabellingLabelling ArchaeologyArchaeology

Page 3: Version Control - Patterns and Practices

ArchitecturesArchitectures

Page 4: Version Control - Patterns and Practices

SourceSafe + Robocopy = SourceSafe + Robocopy = DVCS DVCS

NAS(VSS)

Desktop(VSS)

Laptop(VSS)

Office(VSS)

ROBOCOPYCheck-In

Page 5: Version Control - Patterns and Practices

WorkspaceWorkspace

Page 6: Version Control - Patterns and Practices

BranchingBranching

Page 7: Version Control - Patterns and Practices

Integration/Development Integration/Development BranchBranch

1 2 3 4 5

Page 8: Version Control - Patterns and Practices

Release BranchRelease Branch

3 4 5 6 7

A B

Stable

Volatile

Page 9: Version Control - Patterns and Practices

Feature/Task/Private BranchFeature/Task/Private Branch

3 4 5 6 7

A B C

More Stable

More Volatile

Page 10: Version Control - Patterns and Practices

ShelvingShelving

1 2 3

Page 11: Version Control - Patterns and Practices

ShelvingShelving

1 2 4 5 6

3

Page 12: Version Control - Patterns and Practices

No Branch (Feature No Branch (Feature Toggles)Toggles)

1a 2 1b 3 1c

Always Ready to Ship

Page 13: Version Control - Patterns and Practices

MergingMerging

Page 14: Version Control - Patterns and Practices

Integration PainsIntegration Pains

3 4 5 6 7

X Y Z

A B

Page 15: Version Control - Patterns and Practices

Cherry PickingCherry Picking

3 4 5 6 7

A CB

Page 16: Version Control - Patterns and Practices

CommittingCommitting

Page 17: Version Control - Patterns and Practices

BuildingBuilding

Page 18: Version Control - Patterns and Practices

Gatekeeper WorkflowsGatekeeper Workflows

3 4 5 6 7

X Y

BAlice

Bob

C

GK

Z

D

Page 19: Version Control - Patterns and Practices

LabellingLabelling

Page 20: Version Control - Patterns and Practices

Branching From a LabelBranching From a Label

3 4 5 6 7

A B

v1 X Y

v1.1

Page 21: Version Control - Patterns and Practices

ArchaeologyArchaeology

Page 22: Version Control - Patterns and Practices

LiteratureLiterature

Page 23: Version Control - Patterns and Practices

Questions?Questions?

Page 24: Version Control - Patterns and Practices

Blog:Blog:

http://chrisoldwood.blogspot.comhttp://chrisoldwood.blogspot.com

@chrisoldwood / @chrisoldwood / [email protected]@cix.co.uk