I have SVN repository with structure as below: - BRANCHES Holds the code from the vendors repository(software provider code) - DEV Took from BRANCHES and developers use it
- RC(release candidate) After development code is put to RC for testing - TAGS Code which is released after each build with new functionality
I have been asked to move these type of SVN repositories to GIT
How can I structure the GIT wrt SVN? How to move code from SVN to GIT without TRUNK? How to set Master/Head/Branches/Tags in GIT comparing to Branches/DEV/RC/Tags
If you do a clone like this:
git svn clone svn://server.domain.org/pathtorepo
You will get an unmodified clone of the entire SVN directory structure and history converted to git.
Once in git you can convert directories to branches with;
git filter-branch --subdirectory-filter ...
You can use git filter-branch --tree-filter
to make smaller file changes.
You can use .git/info/grafts
and git filter-branch
to attach branches to the points they split off from other branches.
But merges are more difficult because SVN doesn't have a standard merge marker.
The git svn
command does have things to interpret "standard layouts" of the svn directory structure, but I don't expect that to be too helpful for you. There are, however, other options you will want to use.
BUT if you really want to do the best job you should probably look at the Reposurgeon tool.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.