We currently use subversion as our version control system, we have decided that we are moving to git. I have been having a hard time moving my subversion system with a standard layout into git. I have used git svn as much as I can.
What i need to accomplish is convert our subversion system to git with all commit history and as well as tags and branches. Then to be able to separate each of the projects into separate git repositories with their individual history, then combine each of these individual repositories into submodules.
I would appreciate any ideas on how to most easily accomplish this.
svnroot/
|-- branches
|-- tags
|-- trunk
|-- project A
|-- project B
`-- project C
Please and thank you
If your svn repository layout is:
Then you could create separate git repositories for each project e.g.,
projectA:After that you could create the main git repo (
git init) and add the created git repos forproject{A,B,C}as submodules to it (git submodule).But it is probably not what you want; from the
git submodulemanual:If you’d like to modify
project{A,B,C}from within the main project and keep the unite history of the projects then the submodules are not appropriate for the task.For the provided svn repo layout:
try to create the git repositories using
--trunk,--branches,--tagsarguments e.g.:On completion the
.git/configfile should contain something like:You could use
--ignore-paths=<regex>to skip matching paths from the project.