Difference between revisions of "Converting the SVN Repository To Git"

From Net-SNMP Wiki
Jump to: navigation, search
(documenting steps taken)
(No difference)

Revision as of 23:45, 27 June 2011

This page documents what was done to convert the Net-SNMP source code repository from SVN to Git on June 27th, 2011. It is here for historical purposes, and may help other projects that wish to do the same conversion.

svn2git

Of the various conversion choices (including 'git svn clone'), svn2git seemed like it would work the best. So this was run:

 # svn2git --authors /home/hardaker/src/snmp/git-authors -m -v file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/

Narrowing to the right sub-repo

With SVN the various "projects" (httpd, net-snmp, ...) existed at the top level. This isn't correct for the now separated repositories that git allows for. Thus, git's filter-branch was used to narrow the results:

 # XXX

Branch Merging Setups

In order to make it possible to follow the project's Git Branch Management strategies, the branches had to be set up to follow this paradigm. To do this, the following steps were performed. This step ensure that future merges from lower branches would only contain the newer code choices and that from a "future merges" perspective everything previous to this point would have been considered as "already merged".

 # git checkout V5-5-patches
 # git merge -s ours V5-4-patches
 # git checkout V5-6-patches
 # git merge -s ours V5-5-patches
 ...
 # git checkout master
 # git merge -s ours V5-6-patches