简体   繁体   English

从StarTeam中的“文件共享”范例迁移到像GIT这样的DVCS?

[英]Migrating from 'file sharing' paradigm in StarTeam to a DVCS like GIT?

StarTeam has file sharing between views. StarTeam在视图之间共享文件。 Basically a view in StarTeam can share individual files from other views. 基本上,StarTeam中的视图可以从其他视图共享单个文件。 It can then branch the files as well. 然后它也可以分支文件。 Are there ways to migrate views in StarTeam that share hundreds of files with each other? 有没有办法在StarTeam中迁移彼此共享数百个文件的视图? Anyone have experience with this? 有人有这方面的经验吗? Assuming that the only solution is to convert one StarTeam 'view' to one repository say in GIT, are there strategies to still allow sharing of files amongst multiple repositories in say GIT? 假设唯一的解决方案是将一个StarTeam'视图'转换为一个存储库,例如在GIT中,是否有策略仍允许在GIT中的多个存储库之间共享文件?

Sean 肖恩

Git User's Manual : Git用户手册

Git's submodule support allows a repository to contain, as a subdirectory, a checkout of an external project. Git的子模块支持允许存储库作为子目录包含外部项目的签出。 Submodules maintain their own identity; 子模块保持自己的身份; the submodule support just stores the submodule repository location and commit ID, so other developers who clone the containing project ("superproject") can easily clone all the submodules at the same revision. 子模块支持只存储子模块存储库位置和提交ID,因此克隆包含项目的其他开发人员(“超级项目”)可以轻松克隆同一版本的所有子模块。 Partial checkouts of the superproject are possible: you can tell Git to clone none, some or all of the submodules. 可以对超级项目进行部分检查:您可以告诉Git克隆无,部分或全部子模块。

git-submodule command initialize, update or inspect submodules. git-submodule命令初始化,更新或检查子模块。

I don't know StarTeam, but what you're describing sounds like they could be long-standing branches in Git. 我不认识StarTeam,但你所描述的听起来好像他们可能是Git的长期分支。

Suppose you wanted to have independent releases for some specialized hardware A & B, in addition to your ongoing development: you can keep separate branches for A releases & B releases, with the shared files that you are developing on the master branch. 假设除了正在进行的开发之外,您还希望为某些专用硬件A和B提供独立版本:您可以为A版本和B版本保留单独的分支,以及您在master分支上开发的共享文件。 Then you only merge from master into your specialized branches, and never from them into master . 然后你只能从master合并到你的专业分支,而不是从他们合并到master

This is often simpler than keeping separate repos or sub-modules, because Git is tracking trees of trees if file changes, rather than individual files. 这通常比保留单独的repos或子模块更简单,因为Git在文件更改时跟踪树木,而不是单个文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM