True Git

124

description

 

Transcript of True Git

Page 1: True Git
Page 2: True Git

S T E F A N S A A S E N • S T A S H D E V E L O P M E N T M A N A G E R • A T L A S S I A N • @ s t e f a n s a a s e n

True GitTHE GREAT MIGRATION

Page 3: True Git

TODO Show of hands

Picture with hands/lighter/concert

Page 4: True Git

Source Control Management

SVN Git

Page 5: True Git

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

SVN Git

Page 6: True Git

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

SVN Git

Page 7: True Git

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

41

68

SVN Git

Page 8: True Git

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

41

68

49

70

SVN Git

Page 9: True Git

Source Control Management

2011 2013 (projected) 2013 2015 (projected)

20

78

41

68

49

70 68

55

SVN Git

Page 10: True Git

Why am I passionate about this?

Page 11: True Git

Why am I passionate about this?

Page 12: True Git

Why Git?

Page 13: True Git

Branching & Merging

Page 14: True Git

Branching & Mergingfast, cheap and simple

Page 15: True Git

Branching & Mergingfast, cheap and simple

first class concept

Page 16: True Git

Branching & Mergingfast, cheap and simple

first class concept

Page 17: True Git

Foundation for new workflows

Page 18: True Git

Speed

Page 19: True Git

Speed

git log

git diffgit status

Page 20: True Git

Speed

git bisect

git log

git diffgit status

Page 21: True Git

git bisect

Page 22: True Git

Bad

git bisect

Page 23: True Git

Bad

Good (v2.7)

git bisect

Page 24: True Git

Bad

Test

git bisect

Page 25: True Git

Bad

Test

git bisect

Page 26: True Git

Bad

Regression!

git bisect

Page 27: True Git

Regression!

Fast graph traversalFast checkout

git bisect

Page 28: True Git

Speed

git bisect

git log

git diffgit status

Page 29: True Git

Enables new features

Improves basic features

Page 30: True Git

Local commits

Page 31: True Git

Local commits

Edit & Publish

Page 32: True Git

Local commitsRewrite History

Edit & Publish

Page 33: True Git

Local commitsRewrite History

Edit & Publish

Page 34: True Git

Flexibility

Page 35: True Git

Git does what you are doing today, only better

Page 36: True Git

S V N

Page 37: True Git

L A B E L T I T L E

GIT

S V N

Page 38: True Git

L A B E L T I T L E

GIT

S V N

Existing workflows

Page 39: True Git

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

Page 40: True Git

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 41: True Git

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 42: True Git

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 43: True Git

L A B E L T I T L E

GIT

S V N

New ways of collaborating

Existing workflows

New branchworkflows

Page 44: True Git

Release branching master

2.8

2.7

Page 45: True Git

Release branching master

2.8

2.7

Bugfix

Page 46: True Git

Release branching master

2.8

2.7

Bugfix

Page 47: True Git

Release branching master

2.8

2.7

Bugfix

Page 48: True Git

Release branching master

2.8

2.7

Bugfix

Page 49: True Git

Release branching master

2.8

2.7

Bugfix

Page 50: True Git

Git Workflows a-la-carte

N i c o l a P a o l u c c i

Rapid Agile Delivery

M a t t h e w W a t s o n

T h u r s d a y - 1 1 : 1 5 a m T h u r s d a y - 1 : 1 5 p m

Page 51: True Git
Page 52: True Git

So you’ve decided to migrate!

Page 53: True Git

The process

1

2

3

Inception

Adoption

Conversion

Page 54: True Git

Inception 1

Page 55: True Git

• Is git suitable?

Inception 1

Page 56: True Git

• Is git suitable?

• Test the conversion

Inception 1

Page 57: True Git

• Is git suitable?

• Test the conversion

• Identify the repositories that need to be converted

Inception 1

Page 58: True Git

• 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: True Git

1

Page 60: True Git

1

2

3

The process

Inception

Adoption

Conversion

Page 61: True Git

Adoption 2

Page 62: True Git

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

Adoption 2

Page 63: True Git

• 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: True Git

• 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: True Git

• 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: True Git

2

Page 67: True Git

Just text by itself, for impact.

2

Page 68: True Git

1

2

3

The process

Inception

Adoption

Conversion

Page 69: True Git

We’ve got you covered!

&Scripts Tutorial & Documentation

Page 70: True Git

We’ve got you covered!

&Scripts Tutorial & Documentation

bit.ly/go-dvcs

Page 71: True Git

git-svn

3

Page 72: True Git

3Conversion - Preparation

Page 73: True Git

jdeveloper = John Developer <[email protected]>

Map Authors

3Conversion - Preparation

Page 74: True Git

jdeveloper = John Developer <[email protected]>

Map Authors

Identify SVN repository layout

/tags/trunk/branches

3Conversion - Preparation

Page 75: True Git

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

3Conversion - Initial Clone

Page 76: True Git

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

3Conversion - Initial Clone

?

Page 77: True Git

3Conversion - Sync

Page 78: True Git

3Conversion - Sync

Page 79: True Git

git svn fetch

3Conversion - Sync

Page 80: True Git

Infrastructure first 3

C I I s s u e s I D E

Page 81: True Git

Infrastructure first 3

C I I s s u e s I D E

read-only

Page 82: True Git

Infrastructure first 3

C I I s s u e s I D E

read-only

Page 83: True Git

Infrastructure first 3

C I I s s u e s I D E

read-only

Sync every minute

Page 84: True Git

• Cleanup branches

• Remove unused files

• Create git tags

• Remove commit metadata

3Conversion - Cleanup

Page 85: True Git

• Cleanup branches

• Remove unused files

• Create git tags

• Remove commit metadata

3Conversion - Cleanup

Page 86: True Git

3

C I I s s u e s I D E

read-only

Page 87: True Git

Then your team 3

C I I s s u e s I D E

read-only

Page 88: True Git

Then your team 3

C I I s s u e s I D E

read-only

Page 89: True Git

Then your team 3

C I I s s u e s I D E

read-only

Page 90: True Git

Other Tools?

Page 91: True Git

SubGit

Page 92: True Git

1

2

3

The process

Inception

Adoption

Conversion

Page 93: True Git

Or are you?

Page 94: True Git

Just text by itself, for impact.

Collaboration model?Branching model?

Page 95: True Git

+

Enterprise

Page 96: True Git

Centralized=+

Enterprise

Page 97: True Git

Centralized=+

Enterprise

Builds

Metrics

Issues

Deployments

Page 98: True Git

Workflows will change

Page 99: True Git

Workflows will changefor the better

Page 100: True Git

Workflows will changefor the better

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

Page 101: True Git

This happened in both Confluence and JIRA...

Page 102: True Git

master

confluence-project-4.0

CONF-1234

From SVN like

Page 103: True Git

master

confluence-project-4.0

CONF-1234

git cherry-pick bae6251

From SVN like

Page 104: True Git

master

confluence-project-4.0

CONF-1234

git cherry-pick bae6251

From SVN like

Page 105: True Git

master

confluence-project-4.0

CONF-1234

From SVN like

Page 106: True Git

master

confluence-project-4.0

CONF-1234

From SVN like

Page 107: True Git

master

confluence-project-4.1

To git branch based workflow

Page 108: True Git

master

confluence-project-4.1

To git branch based workflow

Page 109: True Git

master

confluence-project-4.1

CONF-2345

To git branch based workflow

Page 110: True Git

master

confluence-project-4.1

CONF-2345

git merge confluence-project-4.1

To git branch based workflow

Page 111: True Git

master

confluence-project-4.1

CONF-2345

To git branch based workflow

Page 112: True Git

master

confluence-project-4.1

CONF-2345

git merge confluence-project-4.1

To git branch based workflow

Page 113: True Git

Forks can be useful!

Page 114: True Git

Sub-Teams

Forks can be useful!

Page 115: True Git

Sub-Teams

Forks can be useful!

Page 116: True Git

Contributions from outside of the team

Sub-Teams

Forks can be useful!

Page 117: True Git

Conclusion

Page 118: True Git

0

20

40

60

80

2011 2013 (projected) 2013 2015 (projected)

68

4941

20

55

706878

SVN Git

Page 119: True Git

0

20

40

60

80

2011 2013 (projected) 2013 2015 (projected)

68

4941

20

55

706878

SVN Git

Page 120: True Git

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 121: True Git

is here to stay

Page 122: True Git

expands

Page 123: True Git

migration is a solved problem

Page 124: True Git

Thank you!

S T E F A N S A A S E N • S T A S H D E V E L O P M E N T M A N A G E R • A T L A S S I A N • @ s t e f a n s a a s e n