我一直在使用subgit将我的subversion存储库转换为git。不幸的是,我的一个分支机构中的子项目没有标准布局。非标准子项目不包含在转换中。
子项目的内容是
/my-subproject
file1
dir1
subdir1-file1
file2
有没有办法在subgit.conf中的映射中指定它?下面是subgit.conf中的映射。
例如
[git "my-subproject"]
translationRoot = my-subprojcet
repository = /var/git/my-subproject.git
pathEncoding=UTF-8
trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*
答案 0 :(得分:3)
请参阅subgit help configure
,使用'--layout directory'
subgit configure --layout directory ....
'directory':将URL视为分支,仅转换该分支
答案 1 :(得分:1)
如subgit project mapping中所示,配置应为
[git "my-subproject"]
repository = /var/git/my-subproject.git
translationRoot = /
trunk = /my-subproject:refs/heads/master
branches = branches/project/*:refs/heads/*
shelves = shelves/project/*:refs/shelves/*
tags = tags/project/*:refs/tags/*
我希望这会有用。
答案 2 :(得分:1)
通过执行以下操作,我能够将项目从SVN导入到没有主干或分支的gitHUB。
checkout svn directory
subgit import --non-interactive --svn-url svn://svn/MyProject
subgit configure --layout directory svn://svn/MyProject repos.git
*Manually edit authors.txt to map accounts
-- note that [svn] trunk is: trunk = :refs/heads/master
subgit install repos.git
cd repos.git/
git remote add github https://github.com/linkrd/NewMyProject
git push github --all --follow-tags
我以前提交的所有6000+ pf都在那里。