0

I have a very well structured big project which is maintained in SVN in my team. And we not want to move to Git - which will further integrated with continious integration servers like Teamcity or Jenkins (yet to decide). When I saw the svn I found that since svn allows you to create tags from anywhere - It has a lot of tags which only contains single-single projects. The codebase is so huge that I import all the code in one git repo. One approach would be for each project - I can create seperate repos, or combine some of the project to one repo (not sure)

The thing I want to achieve is I want to retain all the history and break the repo so that it becomes easy to manage. (Also it ll be helpful in future while integration with jenkins for automated builds on every commit)

How can I ensure to retain history, have all the existing tags, and move to git

Dave Bacher
  • 15,652
  • 3
  • 63
  • 86
shikjohari
  • 2,278
  • 11
  • 23

2 Answers2

3

git-svn is the obvious solution to help with this migration but, in my opinion, this is better for a one-off migration from SVN to git.

If you want to keep both the SVN and git repositories alive and allow commits to both (keeping them both in sync), I would recommend SubGit.

jas_raj
  • 1,131
  • 6
  • 14
0

When we moved from svn to git I found this stackoverflow post very helpful, specifically the second answer. I assume from your description that everything is under a single trunk. That does make it a little more complicated. I have not tried moving individual projects before, but you may be able to do it in one of two ways:

  1. Migrate the entire svn repo, tags, branches, etc. to your local git repo (before you push to the remote). Then break up the projects by following the suggestions in (this) stackoverflow post. This should give you individual repos that you can then push to the remote repos.

  2. You may be able to alter the steps when running the svn to git conversion and specify an individual project, but that seems dangerous and confusing since the tags/branches won't necessarily line up.

Community
  • 1
  • 1
borq
  • 681
  • 7
  • 15