Top Banner
True The great migration Stefan Saasen
121

JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Jan 15, 2015

Download

Technology

jazoon13

http://guide13.jazoon.com/#/submissions/175
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

True The great migration

Stefan Saasen

Page 2: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

TODO Show of hands

Picture with hands/lighter/concert

Page 3: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Source Control Management

SVN Git

Page 4: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

SVN Git

Page 5: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

SVN Git

Page 6: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

41

68

SVN Git

Page 7: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

41

68

49

70

SVN Git

Page 8: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

41

68

49

70 68

55

SVN Git

Page 9: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Stefan SaasenAtlassian Stash Development Lead

Page 10: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Stefan SaasenAtlassian Stash Development Lead

I come out nice in pictures, I know :-). @stefansaasen

Page 11: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Why am I passionate about this?

Page 12: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Why Git?

Page 13: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Branching & Merging

Page 14: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Branching & Mergingfast, cheap and simple

Page 15: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Branching & Mergingfast, cheap and simple

first class concept

Page 16: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Branching & Mergingfast, cheap and simple

first class concept

Page 17: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Foundation for new workflows

Page 18: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Speed

Page 19: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Speed

git loggit diffgit status

Page 20: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Speed

git bisect

git loggit diffgit status

Page 21: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

git bisect

Page 22: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Bad

git bisect

Page 23: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Bad

Good (v2.7)

git bisect

Page 24: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Bad

Test

git bisect

Page 25: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Bad

Test

git bisect

Page 26: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Bad

Regression!

git bisect

Page 27: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Regression!

Fast graph traversalFast checkout

git bisect

Page 28: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Speed

git bisect

git loggit diffgit status

Page 29: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Enables new features

Improves basic features

Page 30: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Local commits

Page 31: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Local commits

Edit & Publish

Page 32: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Local commitsRewrite History

Edit & Publish

Page 33: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Local commitsRewrite History

Edit & Publish

Page 34: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Flexibility

Page 35: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Git does what you are doing today, only better

Page 36: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

S V N

Page 37: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

L A B E L T I T L E

GIT

S V N

Page 38: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

L A B E L T I T L E

GIT

S V N

Existing workflows

Page 39: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

Page 40: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 41: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 42: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 43: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 44: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Release branching master

2.8

2.7

Page 45: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Release branching master

2.8

2.7

Bugfix

Page 46: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Release branching master

2.8

2.7

Bugfix

Page 47: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Release branching master

2.8

2.7

Bugfix

Page 48: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Release branching master

2.8

2.7

Bugfix

Page 49: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Release branching master

2.8

2.7

Bugfix

Page 50: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Real World git workflowsS t e f a n S a a s e n

W e d n e s d a y - 1 4 : 0 0

Page 51: JAZOON'13 - Stefan Saasen - True Git: The Great Migration
Page 52: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

So you’ve decided to migrate!

Page 53: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

The process

1

2

3

Inception

Adoption

Conversion

Page 54: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Inception 1

Page 55: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• Is git suitable?

Inception 1

Page 56: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• Is git suitable?

• Test the conversion

Inception 1

Page 57: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• Is git suitable?

• Test the conversion

• Identify the repositories that need to be converted

Inception 1

Page 58: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• Is git suitable?

• Test the conversion

• Identify the repositories that need to be converted

• Identify the tools that need to be updated. CI, issue tracking, IDE, scripts and build tools, deployment tools

Inception 1

Page 59: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

1

Page 60: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

1

2

3

The process

Inception

Adoption

Conversion

Page 61: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Adoption 2

Page 62: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• You need to answer: “What’s in it for me”

Adoption 2

Page 63: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• You need to answer: “What’s in it for me”

• Make sure tooling is ready and can be used by everyone

Adoption 2

Page 64: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• You need to answer: “What’s in it for me”

• Make sure tooling is ready and can be used by everyone

• Identify the git champions - they will be thrilled to help

Adoption 2

Page 65: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• You need to answer: “What’s in it for me”

• Make sure tooling is ready and can be used by everyone

• Identify the git champions - they will be thrilled to help

• Don’t expect to win everyone over immediately

Adoption 2

Page 66: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

2

Page 67: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Just text by itself, for impact.

2

Page 68: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

1

2

3

The process

Inception

Adoption

Conversion

Page 69: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

We’ve got you covered!

&Scripts Tutorial & Documentation

Page 70: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

We’ve got you covered!

&Scripts Tutorial & Documentation

bit.ly/go-dvcs

Page 71: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

git-svn

3

Page 72: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

3Conversion - Preparation

Page 73: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

jdeveloper = John Developer <[email protected]>

Map Authors

3Conversion - Preparation

Page 74: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

jdeveloper = John Developer <[email protected]>

Map Authors

Identify SVN repository layout

/tags/trunk/branches

3Conversion - Preparation

Page 75: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

git svn clone \ --authors-file=/authors.txt \ --trunk=/trunk \ --tags=/tags \ --branches=/branches

3Conversion - Initial Clone

Page 76: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

git svn clone \ --authors-file=/authors.txt \ --trunk=/trunk \ --tags=/tags \ --branches=/branches

3Conversion - Initial Clone

?

Page 77: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

3Conversion - Sync

Page 78: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

3Conversion - Sync

Page 79: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

git svn fetch

3Conversion - Sync

Page 80: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Infrastructure first 3

C I I s s u e s I D E

Page 81: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Infrastructure first 3

C I I s s u e s I D E

read-only

Page 82: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Infrastructure first 3

C I I s s u e s I D E

read-only

Page 83: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Infrastructure first 3

C I I s s u e s I D E

read-only

Sync every minute

Page 84: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• Cleanup branches

• Remove unused files

• Create git tags

• Remove commit metadata

3Conversion - Cleanup

Page 85: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

• Cleanup branches

• Remove unused files

• Create git tags

• Remove commit metadata

3Conversion - Cleanup

Page 86: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

3

C I I s s u e s I D E

read-only

Page 87: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Then your team 3

C I I s s u e s I D E

read-only

Page 88: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Then your team 3

C I I s s u e s I D E

read-only

Page 89: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Then your team 3

C I I s s u e s I D E

read-only

Page 90: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Other Tools?

Page 91: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

SubGit

Page 92: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

1

2

3

The process

Inception

Adoption

Conversion

Page 93: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Or are you?

Page 94: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Just text by itself, for impact.

Collaboration model?Branching model?

Page 95: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

+

Enterprise

Page 96: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Centralized=+

Enterprise

Page 97: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Centralized=+

Enterprise

Builds

MetricsIssues

Deployments

Page 98: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Workflows will change

Page 99: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Workflows will changefor the better

Page 100: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Workflows will changefor the better

but they don’t have to change on day one!

Page 101: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

This happened in both Confluence and JIRA...

Page 102: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.0

CONF-1234

From SVN like

Page 103: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.0

CONF-1234

git cherry-pick bae6251

From SVN like

Page 104: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.0

CONF-1234

git cherry-pick bae6251

From SVN like

Page 105: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.0

CONF-1234

From SVN like

Page 106: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.0

CONF-1234

From SVN like

Page 107: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.1

To git branch based workflow

Page 108: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.1

To git branch based workflow

Page 109: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.1

CONF-2345

To git branch based workflow

Page 110: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.1

CONF-2345

git merge confluence-project-4.1

To git branch based workflow

Page 111: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.1

CONF-2345

To git branch based workflow

Page 112: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

master

confluence-project-4.1

CONF-2345

git merge confluence-project-4.1

To git branch based workflow

Page 113: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Conclusion

Page 114: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

0

20

40

60

80

2011 2013 (projected) 2013 2015 (projected)

68

4941

20

55

706878

SVN Git

Page 115: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

0

20

40

60

80

2011 2013 (projected) 2013 2015 (projected)

68

4941

20

55

706878

SVN Git

Page 116: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Subversion (58%) is being

threatened by Git (47%) for de facto leadership of the Version Control space. Z E R O T U R N A R O U N D D E V E L O P E R P R O D U C T I V I T Y R E P O R T 2 0 1 3

Page 117: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

is here to stay

Page 118: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

expands

Page 119: JAZOON'13 - Stefan Saasen - True Git: The Great Migration

migration is a solved problem