Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Migrating to git

661 views

Published on

  • Be the first to comment

Migrating to git

  1. 1. Migrating to Git PEDRO GONÇALVES • CTO • XPAND IT • @LPSG78
  2. 2. The integration between git and Subversion is so well done that several of us have been using git as our interface to all our Subversion repositories.” “ With git-svn you can use git to interface SVN repos JOHN DOE DEVELOPER
  3. 3. GIT SVN git-svn – use git to interface SVN repos • Checking out a Subversion repository is as simple as can be • git-svn clone -s http://example.com/my_subversion_repo local_dir • Making local branches • git checkout -b new_branch_name [old_branch_name] • Adding changes and commiting • git rm • git add • git commit
  4. 4. GIT SVN git-svn – use git to interface SVN repos • Merging local branches • git checkout master • git merge <feature_branch> • Updating from and committing back to Subversion • git-svn rebase • git-svn dcommit
  5. 5. git-svn is not Git. To make use of the full power of Git, you should migrate! svn2git is a tiny utility for migrating projects from Subversion to Git while keeping the trunk, branches and tags where they should be.
  6. 6. SVN2GIT svn2git • Checking out a Subversion repository • svn2git http://example.com/my_subversion_repo --authors ~/authors.txt • git branch –a • git tag –l • Add remote Git repository • git remote add origin https://lpsg@apps.xpand-it.com/stash/scm/sandbox/fly-to-the-moon.git • Push all branches and tags • git push --all • git push --tags
  7. 7. SVN2GIT Some work for the extra mile, don’t forget to: • Convert .svnignore to .gitignore (there is a helper script for this) • Create a proper authors file (there is a helper script for this) • Shutdown, or set your SVN repo to read-only after the migration
  8. 8. It is possible to use SVN and Git at the same time! SubGit is a tool for a smooth, stress-free SVN to Git migration. Create writable Git mirror of a local or remote Subversion repository and use both Subversion and Git as long as you like.
  9. 9. SUBGIT MIRROR • Use SubGit to create a bi-directional Git-SVN mirror of existing Subversion repository. • Push to Git or commit to Subversion at your convenience. • SubGit will take care of synchronization
  10. 10. SVN Mirror for Atlassian Stash
  11. 11. HISTORY • vss2git - Windows GUI application that exports all or parts of an existing Microsoft Visual SourceSafe 6.0 repository to a new Git repository • git-tfs - a two-way bridge between Team Foundation Server Control and git, similar to git-svn. TFS 2013 already includes a Git Server (direct migration). Other importers
  12. 12. HISTORY • git cvsimport - Salvage your data out of another SCM people love to hate • fast-export - A mercurial to git converter. • git-p4 - Import from and submit to Perforce repositories Other importers
  13. 13. Thank you! PEDRO GONÇALVES • CTO • XPAND IT • @LPSG78

×