Flexible vs static branching (Git vs Clearcase/Accurev)

后端 未结 9 977
感情败类
感情败类 2020-11-27 12:53

My question is about the way in which Git handles branches: whenever you branch from a commit, this branch won’t ever receive changes from the parent branch unless you f

相关标签:
9条回答
  • 2020-11-27 13:24

    Have you noticed that you can checkout specfific file versions with GIT too?

    Just use this:

    git checkout [< tree-ish >] [--] < paths >
    

    Like per config spec any existing version of a file (paths) can be loaded into the worktree. Quote from git-checkout docs:

    The following sequence checks out the master branch, reverts the Makefile to two revisions back, deletes hello.c by mistake, and gets it back from the index:

    $ git checkout master             
    $ git checkout master~2 Makefile             
    $ rm -f hello.c            
    $ git checkout hello.c            
    
    0 讨论(0)
  • 2020-11-27 13:26

    I'm not sure if you are asking anything, but you are demonstrating that Accurev streams are different tools than Git (or SVN) branches. (I don't know Clearcase.)

    For example, with Accurev you are forced, as you say, to use certain workflows, which gives you an auditable history of changes that is not supported in Git. Accurev's inheritance makes certain workflows more efficient and others impossible.

    With Git you can have exploratory coding segregated in local repos or in feature branches, which would not be supported very well by Accurev.

    Different tools are good for different purposes; it's useful to ask what each one is good for.

    0 讨论(0)
  • 2020-11-27 13:27

    ClearCase, without MultiSite, is a single repository but Git is distributed. ClearCase commits at the file level but Git commits at the repository level. (This last difference means the original question is based on a misunderstanding, as pointed out in the other posts here.)

    If these are the differences we're talking about then I think 'linear' versus 'DAG' is a confusing way to distinguish these SCM systems. In ClearCase all the versions for a file are referred to as the file's version "tree" but really it is a directed acyclic graph! The real difference to Git is that ClearCase's DAGs exist per file. So I think it is misleading to refer to ClearCase as non-DAG and Git as DAG.

    (BTW ClearCase versions its directories in a similar way to its files - but that's another story.)

    0 讨论(0)
提交回复
热议问题