git-svn 在当前标准布局和过去非标准布局的项目中使用哪种布局
Which layout to use for git-svn in a project with standard layout currently and non standard layout in past
当我们的 subversion 存储库目前遵循标准布局时,我是否应该为 git svn 使用标准布局参数 (-s
),尽管大多数历史记录并非如此?
我正在尝试将 Subversion 存储库导入到 git 中,同时使用 while history。
更多详情
前几年主要项目文件夹在根目录而不是主干文件夹
/ - project folders in root
'- e.g. apps
'- components
/branches
/tags
/trunk - empty
多年后引入了迁移分支并使用了几年
/ - project folders in root
'- e.g. apps
'- components
/branches
'- migration - a long living branch used as main project work for some time
'- e.g. apps
'- components
'- few other branches (<3)
/tags
'- many tags for releases
过去一年当前状态符合标准布局
/ - no files, no folders in root (except trunk, branches, tags)
/branches
'- oldMigration - migration branch renamed (moved)
'- e.g. apps
'- components
'- few other branches (<5)
'- oldRoot - folders from the root moved here
/tags
'- around 150 tags for releases
/trunk
'- e.g. apps
'- components
UPDATE 澄清一下,今后我们不打算(commit/checkout)使用 oldMigration 和 oldRoot。只是我们希望历史能够反映情况,以便阅读历史日志并查看谁更改了哪些文件以及为什么。
在这种情况下,您可以提供 git-svn 多个目录,这些目录代表主干、分支和标签,以涵盖整个历史的所有可能性。
我建议分两步完成,git svn init
和 git svn fetch
,而不是一个 git svn clone
来给自己更多的控制权。
在你的情况下会是...
git svn init --trunk=trunk/ --trunk=. --branches=branches/ --tags=tags/ ...
您可能希望尝试 --trunk=branches/migration
,但老实说,我会将其保留为自己的历史分支(可能后来合并到新主干中),而不是让 Git 假装它是主干一直以来。
当我们的 subversion 存储库目前遵循标准布局时,我是否应该为 git svn 使用标准布局参数 (-s
),尽管大多数历史记录并非如此?
我正在尝试将 Subversion 存储库导入到 git 中,同时使用 while history。
更多详情
前几年主要项目文件夹在根目录而不是主干文件夹
/ - project folders in root
'- e.g. apps
'- components
/branches
/tags
/trunk - empty
多年后引入了迁移分支并使用了几年
/ - project folders in root
'- e.g. apps
'- components
/branches
'- migration - a long living branch used as main project work for some time
'- e.g. apps
'- components
'- few other branches (<3)
/tags
'- many tags for releases
过去一年当前状态符合标准布局
/ - no files, no folders in root (except trunk, branches, tags)
/branches
'- oldMigration - migration branch renamed (moved)
'- e.g. apps
'- components
'- few other branches (<5)
'- oldRoot - folders from the root moved here
/tags
'- around 150 tags for releases
/trunk
'- e.g. apps
'- components
UPDATE 澄清一下,今后我们不打算(commit/checkout)使用 oldMigration 和 oldRoot。只是我们希望历史能够反映情况,以便阅读历史日志并查看谁更改了哪些文件以及为什么。
在这种情况下,您可以提供 git-svn 多个目录,这些目录代表主干、分支和标签,以涵盖整个历史的所有可能性。
我建议分两步完成,git svn init
和 git svn fetch
,而不是一个 git svn clone
来给自己更多的控制权。
在你的情况下会是...
git svn init --trunk=trunk/ --trunk=. --branches=branches/ --tags=tags/ ...
您可能希望尝试 --trunk=branches/migration
,但老实说,我会将其保留为自己的历史分支(可能后来合并到新主干中),而不是让 Git 假装它是主干一直以来。