git服务器文件存储结构,在GIT服务器仓库的特定文件夹中添加本地存储库

有3个选项

选项1。您已经做过的事情(最合理的选择)。

将SVN中的两个项目转换为两个单独的Git存储库。

然后使用GitLab,Atlassian Bitbucket Server或任何其他Git服务器软件设置对存储库的访问。

选项2。将整个SVN存储库视为单个目录。

subgit configure --svn-url /SVN-Repo --layout directory C:\GitRepos\SVN-Repo\repo.git

subgit install C:\GitRepos\SVN-Repo\repo.git

然后你可以运行

subgit uninstall C:\GitRepos\SVN-Repo\repo.git

如果您不需要持续同步。在这种情况下,Git存储库将植根于SVN-Repo。

选项3。一个Git存储库,包含两个项目的分支。

subgit configure --svn-url /SVN-Repo C:\GitRepos\SVN-Repo\repo.git

然后修改repo.git/subgit/config以设置

trunk = Project1/trunk:refs/heads/project1-master

branches = Project2/trunk:refs/heads/project2-master

branches = Project1/branches/*:refs/heads/project1-*

branches = Project2/branches/*:refs/heads/project2-*

shelves = shelves/*:refs/shelves/*

tags = Project1/tags/*:refs/tags/project1-*

tags = Project2/tags/*:refs/tags/project2-*

然后运行

subgit install C:\GitRepos\SVN-Repo\repo.git

然后你可以运行

subgit uninstall C:\GitRepos\SVN-Repo\repo.git

如果您不需要持续同步。

在这种情况下,您有1个Git存储库,其分支以project1-和project2-开头,对应于您的项目。您可以使用project1- / project2-代替project1/ / project2/。

因此,根据您的需要,您可以选择以下3个选项中的一个,但第一个是最好的选项。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值