Changes

Jump to navigation Jump to search
2,121 bytes added ,  23:59, 4 November 2015
new sections: summary, lessons learned, combining repos
== Summary ==
A summary of the steps for migrating your version control system to git from subversion
<li> Update references in your literature, project documents, websites, systems, reference materials and procedure documents to reference the new systems. This step can be ameliorated if in the beginning you reference code in a generic way such as "code.example.com" where you can then link to various aspects and implementations of your code systems; rather than naming them specifically based on technology or implementation.
</ol>
== Lessons Learned ==
* https://techbase.kde.org/Projects/MovetoGit
* http://blog.smartbear.com/software-quality/migrating-from-subversion-to-git-lessons-learned/
 
* http://www.midwesternmac.com/blogs/jeff-geerling/switching-svn-repository-svn2git
== Caveats ==
Once you've established a git infrastructure for version control, git to git migrations are incredibly easy... at least for the core git repository functions. Just add another remote to push/pull. This means that if you wish to change your git infrastructure to use a different system, the work involved will mostly be about the extra features bundled with the system (e.g. web viewer, code review, etc.) and integrations.
== Combining git repos ==
You might desire to reorganize your code in the migration process. There are several tools which allow you to merge git repositories together.
 
* This one called [http://search.cpan.org/dist/Git-FastExport/script/git-stitch-repo git-stitch-repo] seems more capable
* This other one [http://search.cpan.org/~book/Git-FastExport-0.105/script/git-stitch-repo by the same name], authored by Philippe Bruhat (BooK) is nonetheless capable of [http://www.ifup.org/posts/the-right-tool-for-the-job-git-stitch-repo/ merging two (or more) repositories]
* This one, [https://github.com/robinst/git-merge-repos git-merge-repos] is interesting because it talks about taking multiple repositories with more or less the same branches or tags, and merging them at the tag
* [https://stackoverflow.com/questions/277029/combining-multiple-git-repositories This post on Stackoverflow about combining multiple git repositories] mentions git-stitch-repo, and also how it gained the capability to work with non-linear merge histories. It also explains how to do repo merges with git-filter-branch. Note that git-filter-branch requires you to rewrite your history (breaking SHA1 sums).
 
* The [http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html subtree merge strategy page on kernel.org] shows you how to do this.
* https://westmarch.j5int.com/2014/06/splicing-git-repositories-together/ [https://github.com/j5int/jbosstools-gitmigration/blob/master/git_fast_filter/testcases/splice_repos.py Splice Repos] is a python script. It's more recent than some others and a better tool because it's based on fast-export/fast-import <ref>https://git-scm.com/docs/git-fast-import</ref>. It grew out of the [https://github.com/j5int/jbosstools-gitmigration JBossTools git migration] (which itself has some useful info on procedures).
{{References}}
4,558

edits

Navigation menu