Slide 1

Slide 1 text

VERSION CONTROL REINVIGORATED from Subversion to Git and GitHub

Slide 2

Slide 2 text

VERSION CONTROL REINVIGORATED from Subversion to Git and GitHub from Subversion to Git and GitHub

Slide 3

Slide 3 text

@matthewmccull [email protected] github.com/training

Slide 4

Slide 4 text

Who is Matthew? Open source contributor Build tool and continuous delivery author 5 year Git evangelist VP of Training at GitHub

Slide 5

Slide 5 text

The Change

Slide 6

Slide 6 text

SVN ‛ GIT

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

— Every manager, ever If it isn't broke, don't fix it.

Slide 11

Slide 11 text

The Radar

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

July 2011 Technology Radar Prepared by the ThoughtWorks Technology Advisory Board http://www.thoughtworks.com/radar

Slide 15

Slide 15 text

July 2011 Technology Radar Prepared by the ThoughtWorks Technology Advisory Board http://www.thoughtworks.com/radar Tools 30. Subversion 31. Git 32. Infrastructure as code 33. Github 34. Caching reverse proxies 35. Splunk 36. Mercurial 37. Message buses without smarts 38. NoSQL 39. Next gen test tools 40. New Relic beyond Rails 41. TLB 42. Powershell 43. Selenium 2 testing of mobile websites 44. Deltacloud 45. Vagrant 46. API management services 47. jQuery Mobile 48. Backbone.js 49. Sonar 50. Open source bI tools 51. Gradle 52. Cross platform mobile toolkits 53. ESB 54. VCS with “implicit workflow” 55. Code in configuration 26 16 13 22 12 5 3 32 36 46 53 45 44 37 39 35 38 30 4 6 56 76 69 58 57 7 15 14 25 29 28 27 21 23 17 19 24 18 20 11 9 2 10 31 33 42 41 40 50 47 48 49 51 54 43 55 52 34 1 8 New or Moved No change Techniques 1. Progressive enhancement 2. Automate database deployment 3. Platform roadmaps 4. Evolutionary database 5. Emergent design 6. Visualization and metrics 7. Coding architects 8. Evolutionary architecture 9. DevOps 10. Simple performance trending 11. Continuous delivery 12. Concurrency abstractions and patterns 13. Acceptance test of journeys 14. Categorization & prioritization of technical debt 15. Continuous deployment 16. Capability modeling 17. Thoughtful caching 18. Iterative data warehousing 19. Build your own radar 20. Event API’s 21. Event driven business intelligence 22. Smart systems 23. Event sourcing 24. Decision driven BI 25. Scrum certification 26. Database based integration 27. Procedure oriented integration 28. Feature branching 29. Manual infrastructure management

Slide 16

Slide 16 text

Tools 30. Subversion 31. Git 32. Infrastructure as code 33. Github 34. Caching reverse proxies 35. Splunk 36. Mercurial 37. Message buses without smarts 38. NoSQL 39. Next gen test tools 40. New Relic beyond Rails 41. TLB 42. Powershell 43. Selenium 2 testing of mobile websites 44. Deltacloud 45. Vagrant 46. API management services 47. jQuery Mobile 48. Backbone.js 49. Sonar 50. Open source bI tools 51. Gradle 52. Cross platform mobile toolkits 53. ESB 54. VCS with “implicit workflow” 55. Code in configuration 26 16 13 22 12 5 3 32 36 46 53 45 44 37 39 35 38 30 4 6 7 15 14 25 29 28 27 21 23 17 19 24 18 20 11 9 2 10 31 33 42 41 40 50 47 48 49 51 54 43 55 52 34 1 8 New or Moved No change Techniques 1. Progressive enhancement 2. Automate database deployment 3. Platform roadmaps 4. Evolutionary database 5. Emergent design 6. Visualization and metrics 7. Coding architects 8. Evolutionary architecture 9. DevOps 10. Simple performance trending 11. Continuous delivery 12. Concurrency abstractions and patterns 13. Acceptance test of journeys 14. Categorization & prioritization of technical debt 15. Continuous deployment 16. Capability modeling 17. Thoughtful caching 18. Iterative data warehousing 19. Build your own radar 20. Event API’s 21. Event driven business intelligence 22. Smart systems 23. Event sourcing 24. Decision driven BI 25. Scrum certification 26. Database based integration 27. Procedure oriented integration 28. Feature branching 29. Manual infrastructure management

Slide 17

Slide 17 text

Tools 30. Subversion 31. Git 32. Infrastructure as code 33. Github 34. Caching reverse proxies 35. Splunk 36. Mercurial 37. Message buses without smarts 38. NoSQL 39. Next gen test tools 40. New Relic beyond Rails 41. TLB 42. Powershell 43. Selenium 2 testing of mobile websites 44. Deltacloud 45. Vagrant 46. API management services 47. jQuery Mobile 48. Backbone.js 49. Sonar 50. Open source bI tools 51. Gradle 52. Cross platform mobile toolkits 53. ESB 54. VCS with “implicit workflow” 55. Code in configuration 26 16 13 22 12 5 3 32 36 46 53 45 44 37 39 35 38 30 4 6 7 15 14 25 29 28 27 21 23 17 19 24 18 20 11 9 2 10 31 33 42 41 40 50 47 48 49 51 54 43 55 52 34 1 8 New or Moved No change Techniques 1. Progressive enhancement 2. Automate database deployment 3. Platform roadmaps 4. Evolutionary database 5. Emergent design 6. Visualization and metrics 7. Coding architects 8. Evolutionary architecture 9. DevOps 10. Simple performance trending 11. Continuous delivery 12. Concurrency abstractions and patterns 13. Acceptance test of journeys 14. Categorization & prioritization of technical debt 15. Continuous deployment 16. Capability modeling 17. Thoughtful caching 18. Iterative data warehousing 19. Build your own radar 20. Event API’s 21. Event driven business intelligence 22. Smart systems 23. Event sourcing 24. Decision driven BI 25. Scrum certification 26. Database based integration 27. Procedure oriented integration 28. Feature branching 29. Manual infrastructure management

Slide 18

Slide 18 text

26 16 13 22 12 5 3 32 36 46 53 45 44 37 39 35 38 30 4 6 56 74 76 69 58 57 7 15 14 25 29 28 27 21 23 17 19 24 18 20 11 9 2 10 80 75 60 31 33 42 41 40 50 47 48 49 51 54 43 55 52 34 1 8 Ne No ation & prioritization cal debt us deployment y modeling ul caching data warehousing

Slide 19

Slide 19 text

Migration Tools

Slide 20

Slide 20 text

git-svn

Slide 21

Slide 21 text

git-svn Core Git feature

Slide 22

Slide 22 text

$ git svn clone -s http://yourhost.com/reporoot/

Slide 23

Slide 23 text

git-svn Consumes an authors email mapping file

Slide 24

Slide 24 text

(no author) = Codehaus infra sdevijver = Steven Devijver markcc = Mark CC joe = Joe ajtarter = Aaron J Tarter liddon = Lidia Donajczyk-Lipinska jshickey = Scott Hickey HamletDRC = Hamlet D'Arcy aalmiray = Andres Almiray blackdrag = Jochen Theodorou bob = Boc McWhirter brownj = Jeff Brown cstein = Christian Stein

Slide 25

Slide 25 text

git-svn Migrates Subversion tags to Git branches

Slide 26

Slide 26 text

svn2git

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

$ svn2git http://matthew.com/svnrepos/project1

Slide 29

Slide 29 text

importing to git

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

# Publish one branch $ svn2git http://matthew.com/svnrepos/project1 $ git remote add origin https://github.com/you/project1 $ git push origin master

Slide 32

Slide 32 text

# Publish all branches and tags $ svn2git http://matthew.com/svnrepos/svnproject1 $ git clone file://yourpath/svnproject1 gitproject1 $ cd gitproject1 $ git remote add origin https://github.com/you/project1 $ git push --mirror origin

Slide 33

Slide 33 text

Serving SVN from Git

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

$ svn co https://github.com/you/project1/trunk p1svn

Slide 36

Slide 36 text

Data Structures

Slide 37

Slide 37 text

— No engineer, ever Wow! Version control!

Slide 38

Slide 38 text

DAG

Slide 39

Slide 39 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B

Slide 40

Slide 40 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B Δ Δ Δ Δ Δ Δ Δ

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Checkin Checkin Checkin Checkin Checkin Checkin Checkin Checkin Checkin Checkin Checkin Delta storage gets slower as the history of a file gets longer

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Copy of the entire tree per commit

Slide 45

Slide 45 text

Why?

Slide 46

Slide 46 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C

Slide 47

Slide 47 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C

Slide 48

Slide 48 text

hard link to existing identical blobs

Slide 49

Slide 49 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C

Slide 50

Slide 50 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C ß

Slide 51

Slide 51 text

zlib deflates each blob at commit

Slide 52

Slide 52 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C

Slide 53

Slide 53 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C

Slide 54

Slide 54 text

zlib deflates the entire repo

Slide 55

Slide 55 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C

Slide 56

Slide 56 text

v1 v2 v3 v4 File A File B File C File A File B File B File C v5 File A File B File B File A File A File C File C File C

Slide 57

Slide 57 text

Act I 2100 MB became 205 MB

Slide 58

Slide 58 text

refs

Slide 59

Slide 59 text

centralized VCSs use sequential revision numbers

Slide 60

Slide 60 text

Git uses a SHA-1 hash

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

40 hex characters (20 bytes)

Slide 63

Slide 63 text

9AB223D28B1AA46EF1780B22F304982E39872C34

Slide 64

Slide 64 text

9AB223D28B1AA46EF1780B22F304982E39872C34

This is a test

Slide 65

Slide 65 text

This is a test

9AB223D28B1AA46EF1780B22F304982E39872C34

Slide 66

Slide 66 text

‣Blob ‣Tree ‣Commit ‣Tag

Slide 67

Slide 67 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 68

Slide 68 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 69

Slide 69 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 70

Slide 70 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 71

Slide 71 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 72

Slide 72 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 73

Slide 73 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 74

Slide 74 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 75

Slide 75 text

tree tree: 7e8b1 web blob: 9ab16 index.html a10b3 tree blob: 8d162 logo.jpg blob: 51d22 draw.js 7e8b1 commit tree: a10b3 parent: nil author: Fird committer: Matthew message: Major refactoring of the web content. c67db blob 9ab16 blob //Some more javascript var renderSize 51d22 blob 7D 8D B3 7F BD 12 9F E9 7B 78 9D 3F 5C A6 72 CB 8d162

Slide 76

Slide 76 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 77

Slide 77 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 78

Slide 78 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 79

Slide 79 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 80

Slide 80 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 81

Slide 81 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 82

Slide 82 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 83

Slide 83 text

v1 v2 v3 commit tree: 9a87b parent: nil author: Fird committer: Matthew message: Major refactoring of the Javascript rendering engine. c67db commit tree: b22c1 parent: c67db author: Tim committer: Fird message: Minor update to HTML 9bd21 commit tree: b22c1 parent: 9bd21 author: Johnny committer: Joe message: New language transations 1c2d7

Slide 84

Slide 84 text

RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1

Slide 85

Slide 85 text

RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1

Slide 86

Slide 86 text

RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1

Slide 87

Slide 87 text

RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1

Slide 88

Slide 88 text

RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1

Slide 89

Slide 89 text

RELEASE_1.0 HEAD bug979branch commit c67db commit 9bd21 commit 1c2d7 commit 8c2d1 commit 1bdcd commit 2daa1

Slide 90

Slide 90 text

Git Highlights

Slide 91

Slide 91 text

Local commits

Slide 92

Slide 92 text

Content Tracking

Slide 93

Slide 93 text

simpler Merges

Slide 94

Slide 94 text

Start now

Slide 95

Slide 95 text

git-svn conversion to Git git-svn bridge to SVN GitHub SVN URLs Conversion Options

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

Thanks!

Slide 98

Slide 98 text

@matthewmccull [email protected] github.com/training