SlideShare a Scribd company logo
Moving to Git
Tim Moore
   tmoore
 twitter.com/
bitbucket.org/
Subversion Workflow

trunk
Subversion Workflow

     trunk
Subversion Workflow

     trunk
Subversion Workflow

     trunk




     stable
Subversion Workflow

     trunk




               1.0



             stable
Subversion Workflow

     trunk




               1.0



             stable
Subversion Workflow

     trunk




               1.0



             stable
Subversion Workflow

          trunk




            1.0



          stable
Broken Build

       trunk




         1.0



       stable
Critical Bug On Stable

            trunk




              1.0



            stable
Critical Bug On Stable

            trunk




             1.0     1.0.1



                    stable
Critical Bug On Stable

            trunk




             1.0     1.0.1



                    stable
Critical Bug On Stable

                   trunk

                     m


             1.0    1.0.1



                   stable
Merge Hell
Migration
OPTIMISE FOR
STABILITY
Get to
Get to
Get to
Get to
Convert



svn
Convert



svn    git-svn


      git-svn clone -s
Convert



svn   git-svn
Convert



svn      git-svn           git


      git push bitbucket
Mirror



svn   git-svn   git
Mirror



svn   git-svn   git
Mirror



svn   git-svn   git
Mirror



svn   git-svn   git
Mirror



svn   git-svn   git
Mirror



svn   git-svn   git
Mirror



svn   git-svn   git
Migrate Tools



svn      git-svn      git
Migrate Tools



svn      git-svn      git
Migrate Tools



svn      git-svn      git
Migrate Tools



svn      git-svn      git
Migrate Tools



svn      git-svn      git
Migrate Tools



svn      git-svn      git
Migrate Tools



svn      git-svn      git
Migrate Tools



svn      git-svn      git
Migrate People



svn      git-svn       git
Migrate People



svn      git-svn       git
Migrate People



svn      git-svn       git
Migrate People



svn      git-svn       git
Migrate People



                 git
Migrate People



     git
Git Workflow

master

  1.0
Release From Master

master

  1.0
Changes On Branches

master

  1.0




         OD-1-bug-fix
Changes On Branches

master

  1.0




         OD-1-bug-fix
Changes On Branches

master

  1.0




         OD-1-bug-fix
Changes On Branches

master

  1.0    git merge --ff-only OD-1-bug-fix




                OD-1-bug-fix
Fast-Forward Master


 1.0


           master



         OD-1-bug-fix
Git Workflow


1.0


                         master

                           1.1



           OD-1-bug-fix
Git Workflow

master

  1.0




              1



                   OD-1-bug-fix


         OD-2-feature
Git Workflow


1.0


                           master

        1                    1.1



            OD-1-bug-fix
                 2



            OD-2-feature
Git Workflow


1.0


                          master

        1                   1.1



            OD-1-bug-fix
                 2                      m

                                   OD-2-feature
Git Workflow


1.0


                          master

        1                   1.1



            OD-1-bug-fix
                 2                      m

                                   OD-2-feature
Git Workflow


1.0




        1                 1.1


                                   master
            OD-1-bug-fix
                 2                   m

                                OD-2-feature
Thanks!

More Related Content

PDF
Git basics for beginners
KEY
Introduction To Git
PDF
Git and git hub
PPT
Open Source Collaboration With Git And Git Hub
PDF
Introduction to Git
PPTX
Git basics
PDF
Introduction to Git for Artists
PDF
Presentacion git
Git basics for beginners
Introduction To Git
Git and git hub
Open Source Collaboration With Git And Git Hub
Introduction to Git
Git basics
Introduction to Git for Artists
Presentacion git

What's hot (20)

PDF
Git advanced
PPTX
Version control system & how to use git
PDF
Version Control with Git
PDF
Pragmatic Guide to Git
PDF
Git basics
PDF
Enjoy privacy on Gitlab
PPTX
Workshop on Source control, git merge walkthroughs
PDF
Git basics
PPTX
Git basics
PDF
Git hooks
PDF
Git - The Incomplete Introduction
PPT
Git Introduction
PPTX
Luis atencio on_git
PDF
Version Control History and Git Basics
PPTX
PPTX
Git in 10 minutes
PDF
Git хуки на страже качества кода
PDF
沒有 GUI 的 Git
PDF
いつやるの?Git入門
ODP
Git 101, or, how to sanely manage your Koha customizations
Git advanced
Version control system & how to use git
Version Control with Git
Pragmatic Guide to Git
Git basics
Enjoy privacy on Gitlab
Workshop on Source control, git merge walkthroughs
Git basics
Git basics
Git hooks
Git - The Incomplete Introduction
Git Introduction
Luis atencio on_git
Version Control History and Git Basics
Git in 10 minutes
Git хуки на страже качества кода
沒有 GUI 的 Git
いつやるの?Git入門
Git 101, or, how to sanely manage your Koha customizations
Ad

Viewers also liked (8)

PDF
git- Most Of The Things About a Trending DVCS
PDF
Git, the DVCS from hell
KEY
Distributed Version Control Systems
PPTX
Getting Started with Git: A Primer for SVN and TFS Users
PPTX
Svn vs mercurial vs github
ODP
Git vs svn
PDF
Git 101 Presentation
PDF
SVN 2 Git
git- Most Of The Things About a Trending DVCS
Git, the DVCS from hell
Distributed Version Control Systems
Getting Started with Git: A Primer for SVN and TFS Users
Svn vs mercurial vs github
Git vs svn
Git 101 Presentation
SVN 2 Git
Ad

Similar to Moving to Git (20)

KEY
Uber git workflow
KEY
Uber git workflow
KEY
Uber git workflow
PDF
Subversion to Git Migration
PPTX
Session git
PDF
Version control system
KEY
Distributed Version Control Systems
KEY
Introduction to Git
PDF
M.Mozūras - git
PDF
Git cheat-sheets
PDF
Git with t for teams
PPTX
Gitflow - Una metología para manejo de Branches
PDF
Git and Github
PDF
Introducing Git and git flow
ODP
Why You Should Be Using Git
PPTX
Git collaboration
Uber git workflow
Uber git workflow
Uber git workflow
Subversion to Git Migration
Session git
Version control system
Distributed Version Control Systems
Introduction to Git
M.Mozūras - git
Git cheat-sheets
Git with t for teams
Gitflow - Una metología para manejo de Branches
Git and Github
Introducing Git and git flow
Why You Should Be Using Git
Git collaboration

Moving to Git

Editor's Notes

  • #2: \n
  • #3: Our Subversion workflow: how it worked and why we wanted to switch\nOur migration process: how we made the switch to Git without disruption\nOur Git workflow: what we changed and why it's better now\n
  • #4: Most commits go to trunk\n
  • #5: Most commits go to trunk\n
  • #6: When we need to do a release, we would freeze trunk\nand create a stable branch to release from\n
  • #7: When we need to do a release, we would freeze trunk\nand create a stable branch to release from\n
  • #8: Update version on the stable branch\nTag it\n
  • #9: Unfreeze trunk\n
  • #10: Keep committing there\nThis is good for the ideal situation: everything on trunk is good, stable doesn’t need to change\n
  • #11: Now nobody can commit at all\nCan’t release until it’s fixed\n\nWe tried topic branches to reduce risk on trunk, but ran into frequent conflicts\nMerge hell\n
  • #12: What about a bug on stable?\n
  • #13: You have to fix it on stable\n
  • #14: Bump the version, tag and release\n
  • #15: Merge to trunk\nPray there are no conflicts\nIf the intervening commit changed something on trunk that changed on the branch, you’re in merge hell\nThe merge doesn’t explicitly track the second parent\nIf you need to merge again from the branch, you’re in merge hell\n
  • #16: Subversion handles conflicts more poorly than DVCS tools\nThis svn development workflow increases mistakes\nWe’ve had dependencies go backwards\nTree conflicts\nSemantic conflicts: think about tests\nConflicts are often resolved on trunk\nSometimes you forget to merge changes on branches\nSubversion doesn’t visualise branches well\nSubversion doesn’t track merges well\nSome clients don’t work with merge tracking—bolted on\n\nWe needed to escape\nWanted to move to a workflow where risky changes are isolated\nWithout risking constant merge hell\n
  • #17: \n
  • #18: Get to know git first\nMinimize time that devs can’t commit\nKeep builds running\nKeep code reviews\nEnsure you can always release\nDon’t change process at the same time—wait until after you migrate\nLeave time/flexibility in your plan to deal with unforeseen issues\n
  • #19: \n
  • #20: \n
  • #21: \n
  • #22: \n
  • #23: Migration Algorithm: similar to blue-green deploy model, or database replication\nConvert svn repo to git\nMirror svn to git as a read-only copy\nMigrate tools first (readers)\nMigrate people last (writers)\nLook at the converted repo, make sure it makes sense\nClean up tags\nNo hierarchical branches\nConsider trimming\nPrivate branches\nLarge objects in single branches\nConsider archive repo\nNever commit/push directly to this: use for mirroring only\nConsider periodically pushing this repo to a separate remote repo\n
  • #24: Migration Algorithm: similar to blue-green deploy model, or database replication\nConvert svn repo to git\nMirror svn to git as a read-only copy\nMigrate tools first (readers)\nMigrate people last (writers)\nLook at the converted repo, make sure it makes sense\nClean up tags\nNo hierarchical branches\nConsider trimming\nPrivate branches\nLarge objects in single branches\nConsider archive repo\nNever commit/push directly to this: use for mirroring only\nConsider periodically pushing this repo to a separate remote repo\n
  • #25: Migration Algorithm: similar to blue-green deploy model, or database replication\nConvert svn repo to git\nMirror svn to git as a read-only copy\nMigrate tools first (readers)\nMigrate people last (writers)\nLook at the converted repo, make sure it makes sense\nClean up tags\nNo hierarchical branches\nConsider trimming\nPrivate branches\nLarge objects in single branches\nConsider archive repo\nNever commit/push directly to this: use for mirroring only\nConsider periodically pushing this repo to a separate remote repo\n
  • #26: Migration Algorithm: similar to blue-green deploy model, or database replication\nConvert svn repo to git\nMirror svn to git as a read-only copy\nMigrate tools first (readers)\nMigrate people last (writers)\nLook at the converted repo, make sure it makes sense\nClean up tags\nNo hierarchical branches\nConsider trimming\nPrivate branches\nLarge objects in single branches\nConsider archive repo\nNever commit/push directly to this: use for mirroring only\nConsider periodically pushing this repo to a separate remote repo\n
  • #27: Migration Algorithm: similar to blue-green deploy model, or database replication\nConvert svn repo to git\nMirror svn to git as a read-only copy\nMigrate tools first (readers)\nMigrate people last (writers)\nLook at the converted repo, make sure it makes sense\nClean up tags\nNo hierarchical branches\nConsider trimming\nPrivate branches\nLarge objects in single branches\nConsider archive repo\nNever commit/push directly to this: use for mirroring only\nConsider periodically pushing this repo to a separate remote repo\n
  • #28: Migration Algorithm: similar to blue-green deploy model, or database replication\nConvert svn repo to git\nMirror svn to git as a read-only copy\nMigrate tools first (readers)\nMigrate people last (writers)\nLook at the converted repo, make sure it makes sense\nClean up tags\nNo hierarchical branches\nConsider trimming\nPrivate branches\nLarge objects in single branches\nConsider archive repo\nNever commit/push directly to this: use for mirroring only\nConsider periodically pushing this repo to a separate remote repo\n
  • #29: Migration Algorithm: similar to blue-green deploy model, or database replication\nConvert svn repo to git\nMirror svn to git as a read-only copy\nMigrate tools first (readers)\nMigrate people last (writers)\nLook at the converted repo, make sure it makes sense\nClean up tags\nNo hierarchical branches\nConsider trimming\nPrivate branches\nLarge objects in single branches\nConsider archive repo\nNever commit/push directly to this: use for mirroring only\nConsider periodically pushing this repo to a separate remote repo\n
  • #30: Post-commit hook in Subversion\nCron job on a machine hosting the conversion repo\nCI server\n
  • #31: \n
  • #32: \n
  • #33: \n
  • #34: \n
  • #35: \n
  • #36: \n
  • #37: \n
  • #38: \n
  • #39: \n
  • #40: \n
  • #41: \n
  • #42: \n
  • #43: \n
  • #44: Move tools one at a time\nStart with a separate CI plan\nMake sure its behaviour matches the normal one\nHow to decide when to pass here?\nMove normal one when you’re confident\nYou might want to hold off on automated release builds until later, but test them now\nCode review/source browsing/searching\nDashboards\n
  • #45: All at once\nTry to get everyone committed, otherwise need to use patches\nCode freeze svn\nClone remote git repo\nYou’re off!\n
  • #46: \n
  • #47: \n
  • #48: \n
  • #49: \n
  • #50: \n
  • #51: \n
  • #52: Consider leaving the original svn repo running, read-only to avoid breaking links\nOnly change process after you're comfortable with the new tools\n
  • #53: \n
  • #54: We release from master directly\nMaster is the stable branch\n
  • #55: We put changes on a branch\nIssue key (for traceability)\nTextual description (for readability)\nProtip: use git bash completion\n
  • #56: We do reviews and QA on the branch\n
  • #57: When the branch is ready to release, we do a fast-forward merge to master\n
  • #58: Fast-forwarding ensures no untested commits hit master\n
  • #59: \n
  • #60: Simultaneous features are on separate branches\n
  • #61: Can keep committing to topic branches while master is merged and released\n
  • #62: New commits on master are merged to active topic branches\n
  • #63: Merge commits are tested on the branch\n
  • #64: Fast-forward master when it’s ready to release\n\nmaster is always stable & releasable\nchanges & merges are always tested before hitting master\nbalances continuous integration with scalability & safety\n
  • #65: \n