Effective version control

15
Effective Version Control Barney Boisvert

Transcript of Effective version control

Page 1: Effective version control

Effective Version ControlBarney Boisvert

Page 2: Effective version control

Agenda

● Who am I?

● Concepts

● Evolution

● Best practices

● Centralized or Distributed?

Page 3: Effective version control

Who Am I?

● Software Architect

● JVM Engineer

● Craftsman

● Father

● Goalkeeper

● Whisk(e)?y Enthusiast

Page 4: Effective version control

Concepts

● Repository

● Working copy

● Patch

● History

● Tag

Page 5: Effective version control

Concepts

● Repository

● Working copy

● Patch

● History

● Tag

1 2 3 4 5 6 7 WC

initial commit HEAD

Page 6: Effective version control

Concepts

● Repository

● Working copy

● Patch

● History

● Tag

1 2 3 4 5 6 7 WC

initial commit HEADv1.0

Page 7: Effective version control

Concepts

● Branch

● Merge

● Ancestry

● Repository

● Working copy

● Patch

● History

● Tag

1 2

3

4

5

6

7

WC

initial commit

HEAD

HEAD

v1.0

Page 8: Effective version control

Evolution*

● SCCS

● RCS

● CVS

● SVN

● Git / Mercurial

open-source centric, not comprehensive BitMover Inc. Perforce Software Inc. IBM Rational Microsoft

● BitKeeper

● Perforce

● ClearCase

● TFS, née VSS

1

2

3

1

2

3

*

4

4

Page 9: Effective version control

Evolution

● diff, patch & email ● SCCS

● RCS

● CVS

● SVN

● Git/Mercurial

Page 10: Effective version control

“Best” Practices

● All Hail /trunk!

● Commit early, commit often

● Branch early, merge often

Page 11: Effective version control

“Best” Practices

● All Hail /trunk!

● Commit early, commit often

● Branch early, merge often

● master is always releasable

● Use feature branch(es)

● Tag every release

● Hotfix branches

● Release artifacts

Page 12: Effective version control

“Distributed” Version Control Systems

● Holy Shiny Tech, Batman!

● Defer centralization

● Whole repo everywhere

● BLOB storage

● Repo-per-unit

● Access-per-repo

● Addressability

Page 13: Effective version control

Concepts

● Vendor branch

● Fork

● Pull request

● Repository

● Working copy

● Patch

● History

● Ancestry

● Branch

● Merge

● Tag

Page 14: Effective version control

Evolution

● Facebook's Mercurial

● XxxHub.com

● SCCS

● RCS

● CVS

● SVN

● Git/Mercurial

● diff, patch & email

Page 15: Effective version control

Soapbox!

Version ControlIf you aren't using version control, start before you do anything else.

ToolingYour tools are more powerful than you can possibly imagine.

Don't be a HeroPeople smarter than you (or I) already did it; use their code.