Post

SVN to GIT migration

The following script will automate svn to git migration. Save this in your svn directory svn2git.sh

  1. Clone the svn repository with “git svn” command e.g. git svn clone [SVNProjectRootDirectory] -T [TrunkDirectoryName] -b [BranchDirectoryName] -t [TagDirectoryName]
  2. Loop through all the remote branches/tags and check them out to local respectively.
  3. Push all local branches/tags to the new repository.

USAGE:

1
svn2git.sh [GitRepositoryUrl]  [SvnRepositoryUrl]   [TrunkDirectoryName]   [BranchDirectoryName]   [TagDirectoryName]

Happy Coding! 😇

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.

© Vincent. Some rights reserved.