True Git
THE GREAT MIGRATION

STEFAN SAASEN • STASH DEVELOPMENT MANAGER

• ATLASSIAN • @stefansaasen
TODO Show of hands

Picture with hands/lighter/concert
Source Control Management

SVN

Git
Source Control Management

2011

2013 (projected)
SVN

2013
Git

2015 (projected)
Source Control Management
78

20

2011

2013 (projected)
SVN

2013
Git

2015 (projected)
Source Control Management
78
68
41
20

2011

2013 (projected)
SVN

2013
Git

2015 (projected)
Source Control Management
78

70

68

49

41
20

2011

2013 (projected)
SVN

2013
Git

2015 (projected)
Source Control Management
78

70

68

68
49

41

55

20

2011

2013 (projected)
SVN

2013
Git

2015 (projected)
Why am I passionate about this?
Why am I passionate about this?
Why Git?
Branching & Merging
Branching & Merging
fast, cheap and simple
first class concept

Branching & Merging
fast, cheap and simple
first class concept

Branching & Merging
fast, cheap and simple
Foundation for new
workflows
Speed
Speed
git log
git status

git diff
git bisect

Speed
git log
git status

git diff
git bisect
Bad
git bisect
Good (v2.7)

Bad
git bisect
Test

Bad
git bisect
Test

Bad
git bisect
Regression!

Bad
git bisect
Regression!

git bisect

Fast graph traversal
Fast checkout
git bisect

Speed
git log
git status

git diff
Enables new features
Improves basic features
Local commits
Edit & Publish

Local commits
Edit & Publish

Local commits
Rewrite History
Edit & Publish

Local commits
Rewrite History
Flexibility
Git does what you are
doing today, only better
SVN
GIT

SVN

LABEL TITLE
GIT

SVN

LABEL TITLE

Existing
workflows
GIT

SVN

LABEL TITLE

Existing
workflows

New ways of
collaborating
GIT

SVN

LABEL TITLE

Existing
workflows

New branch
workflows

New ways of
collaborating
GIT

SVN

LABEL TITLE

Existing
workflows

New branch
workflows

New ways of
collaborating
GIT

SVN

LABEL TITLE

Existing
workflows

New branch
workflows

New ways of
collaborating
GIT

SVN

LABEL TITLE

Existing
workflows

New branch
workflows

New ways of
collaborating
Release branching
master

2.8

2.7
Release branching
master

2.8

2.7

Bugfix
Release branching
master

2.8

2.7

Bugfix


Release branching
master

2.8

2.7

Bugfix


Release branching
master

2.8

2.7

Bugfix


Release branching
master

2.8

2.7

Bugfix


Git Workflows
a-la-carte

Rapid Agile
Delivery

Nicola Paolucci
Thursday - 11:15 am

Matthew Watson
Thursday - 1:15 pm
So you’ve decided to
migrate!
The process

Adoption

2
1
3
Inception

Conversion
Inception

1
Inception
• Is git suitable?

1
Inception
• Is git suitable?
• Test the conversion

1
Inception
• Is git suitable?
• Test the conversion
• Identify the repositories that need to be converted

1
Inception
• 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

1
1
The process

Adoption

2
1
3
Inception

Conversion
Adoption

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

2
Adoption
• You need to answer: “What’s in it for me”
• Make sure tooling is ready and can be used by
everyone

2
Adoption
• 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

2
Adoption
• 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

2
2
2

Just text by itself, for
impact.
The process

Adoption

2
1
3
Inception

Conversion
We’ve got you covered!

&
Scripts

Tutorial & Documentation
We’ve got you covered!

&
Scripts

Tutorial & Documentation
bit.ly/go-dvcs
3

git-svn
Conversion - Preparation

3
Conversion - Preparation

3

Map Authors
jdeveloper = John Developer <jd@example.com>
Conversion - Preparation

3

Map Authors
jdeveloper = John Developer <jd@example.com>

/tags
/trunk
/branches

Identify SVN
repository layout
Conversion - Initial Clone

3

git svn clone 
--authors-file=/authors.txt 
--trunk=/trunk 
--tags=/tags 
--branches=/branches
Conversion - Initial Clone

?

3

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

3
Conversion - Sync

3
Conversion - Sync

git svn fetch

3
Infrastructure first

CI

Issues

IDE

3
Infrastructure first
read-only

CI

Issues

IDE

3
Infrastructure first
read-only

CI

Issues

IDE

3
Infrastructure first
read-only
Sync every minute

CI

Issues

IDE

3
Conversion - Cleanup
• Cleanup branches
• Remove unused files
• Create git tags
• Remove commit
metadata

3
Conversion - Cleanup
• Cleanup branches
• Remove unused files
• Create git tags
• Remove commit
metadata

3
3
read-only

CI

Issues

IDE
3

Then your team
read-only

CI

Issues

IDE
3

Then your team
read-only

CI

Issues

IDE
3

Then your team
read-only

CI

Issues

IDE
Other Tools?
SubGit
The process

Adoption

2
1
3
Inception

Conversion
Or are you?
Collaboration model?
Branching model?

Just text by itself, for
impact.
+

Enterprise
+

Enterprise

= Centralized
Metrics
Issues
Builds

Deployments

+

Enterprise

= Centralized
Workflows will change
for the better

Workflows will change
for the better

Workflows will change
but they don’t have to change on day one!
This happened in both
Confluence and JIRA...
From SVN like

confluence-project-4.0
CONF-1234

master
From SVN like
git cherry-pick bae6251

confluence-project-4.0
CONF-1234

master
From SVN like
git cherry-pick bae6251

confluence-project-4.0
CONF-1234

master
From SVN like

confluence-project-4.0
CONF-1234

master
From SVN like

confluence-project-4.0
CONF-1234

master
To git branch based workflow

confluence-project-4.1

master
To git branch based workflow

confluence-project-4.1

master
To git branch based workflow

confluence-project-4.1
CONF-2345

master
To git branch based workflow
git merge confluence-project-4.1

confluence-project-4.1
CONF-2345

master
To git branch based workflow

confluence-project-4.1
CONF-2345

master
To git branch based workflow
git merge confluence-project-4.1

confluence-project-4.1
CONF-2345

master
Forks can be
useful!
Forks can be
useful!

Sub-Teams
Forks can be
useful!

Sub-Teams
Forks can be
useful!

Contributions from
outside of the team

Sub-Teams
Conclusion
80

78

70

68

60

20
0

49

41

40

68
55

20

2011

2013 (projected)
SVN

2013
Git

2015 (projected)
80

78

70

68

60

20
0

49

41

40

68
55

20

2011

2013 (projected)
SVN

2013
Git

2015 (projected)
“

Subversion (58%) is being
threatened by Git (47%) for de
facto leadership of the Version
Control space.

”

ZEROTURNAROUND DEVELOPER PRODUCTIVITY REPORT 2013
is here to stay
expands
migration is a
solved problem
Thank you!
STEFAN SAASEN • STASH DEVELOPMENT MANAGER

• ATLASSIAN • @stefansaasen

True Git