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
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
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.
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.)