从 ClearCase 迁移到 Git

发布于 2024-09-15 05:29:36 字数 508 浏览 4 评论 0 原文

我来自 ClearCase 背景,我们(简单地说)的工作流程由三个步骤组成,其中最左边的主干是不稳定的,中间的主干是质量保证,最右边的主干是稳定的。 ie)

A  A  A
|  |  |
B  C  |
| /|  |
C  |  E
|  | /  
D  E
| /
E

如您所见,稳定主干仅包含已合格的版本。我在 Git 中复制此工作流程时遇到问题,因为版本 B、C 和 D 也被推入 QA 主干,随后推入稳定主干。在我看来,这违背了仅包含稳定版本的“干净”主干的目的。

现在,Git 和 ClearCase 之间存在明显的根本差异,我确信这解释了为什么我在使用以前的概念来指定工作流程时遇到困难。

几天来我一直在尝试了解这些新的 SCM 工具(我也研究了 Mercurial),并且确实可以使用一些关于如何继续进行的指导。我们正在 Mac 和 Windows PC 上进行开发,与命令行相比,绝大多数团队更喜欢 GUI 工具。

谢谢! :-)

I'm coming from a ClearCase background where we (simply speaking) had a workflow made up of three steps where the leftmost trunk was unstable, middle trunk is Quality Assurance and the rightmost was stable. i.e.)

A  A  A
|  |  |
B  C  |
| /|  |
C  |  E
|  | /  
D  E
| /
E

As you can see the stable trunk contains only the versions that have been qualified. I'm having problems replicating this workflow in Git as versions B, C and D are also pushed into the QA trunk and subsequently the stable trunk. In my eyes this defeats the purpose of a "clean" trunk containing only stable versions.

Now there's obviously fundamental differences between Git and ClearCase which I'm sure explains why I'm having trouble using my previous conceptions to specify a workflow.

I've been trying to wrap my head around these new SCM tools (I've looked at Mercurial too) for a couple of days now and could really use some pointers on how to proceed. We're developing on Mac and Windows PCs and the vast majority of the teams prefer GUI tools compared to command line.

Thanks! :-)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

行雁书 2024-09-22 05:29:36

首先,您可以阅读ClearCase 之间的比较和 Git

正如子模块和分支之间的中间地带所解释的?,当来自 ClearCase 时可能会欺骗您的一个概念是组合的概念(配置继承):请参阅 灵活分支与静态分支(GIT 与 Clearcase/Accurev)

ClearCase 按文件工作(或按活动工作,每个活动都是一组文件)。
Git 按 blob delta 工作(每个 blob 代表一个内容:如果两个文件具有相同的内容,则只会存储一个“blob”)

这意味着您要通过分支在 ClearCase 中尝试执行的操作/流和活动(如果您使用 UCM),更有可能通过以下方式实现:

  • 提交重新排序(rebase --interactive,这是“git”方式,在 Mercurial 中不推荐)
  • 和/或 发布 (这是分支的正交维度,特定于 DVCS )

重新排序 + 合并(仅适用于尚未“发布”的提交,即未推送):
您正在重新排序应用于代码的修改增量,以便仅合并您想要的内容。

trunk => trunk'  QA => QA'  stable
  A        B'    
  |        |  
  B        D'
  |        |  
  C        A'----A'    C''
  |        |     |     |
  D        C'    C'    A''--  A''  (--: merge to branch)
  |        |     |     |      |
  E        E     E     E      E
  • 重新排序 + 发布(推送):

您还可以通过自己的 git 存储库来表示每个代码升级。
一旦提交按正确顺序排列,您就可以将相关分支推送到 QA 存储库或稳定存储库。


重新排序(历史重写)是:

另请参阅:

First you can read this comparison between ClearCase and Git

As explained in Middle-ground between submodules and branches?, the one concept which is likely to trick you when coming from ClearCase is the notion of composition (configuration inheritance): see Flexible vs static branching (GIT vs Clearcase/Accurev).

ClearCase works file by file (or activity by activity, each activity being a group of files).
Git works blob delta by blob delta (each blob representing a content: if two files have the same content, only one "blob" will be stored)

That means what you are trying to do in ClearCase through branch/streams and activities (if you are using UCM), will more likely be achieved through:

  • commit reordering (rebase --interactive, which is the "git" way, and not recommended in mercurial)
  • and/or publication (which is an orthogonal dimension to branching, specific to DVCS)

reordering + merge (only for commits not yet "published", ie not pushed):
You are reordering the modifications deltas applied to your code, in order to merge only what you want.

trunk => trunk'  QA => QA'  stable
  A        B'    
  |        |  
  B        D'
  |        |  
  C        A'----A'    C''
  |        |     |     |
  D        C'    C'    A''--  A''  (--: merge to branch)
  |        |     |     |      |
  E        E     E     E      E
  • reordering + publication (push):

You can also represent each code promotion by a git repo of its own.
Once the commits are in the proper order, you push the relevant branches to a QA repo, or a stable repo.


The reordering (history rewriting) is:

See also:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文