In terms of svn-like vendor branches, there are many tricks around the web, but the most intelligent discussion I have found is in Chapter 6 of Pro Git, in the discussion of submodules, superproject (a small pithy paragraph which I think touches on the Drupal case) and subtrees. It remains to be seen what will emerge as the "Drupal way" here... Victor Kane On Thu, Apr 29, 2010 at 10:27 PM, Antonio P. P. Almeida <perusio@gmail.com>wrote:
On 30 Abr 2010 02h12 WEST, andrewberry@sentex.net wrote:
On 2010-04-29, at 5:34 PM, Domenic Santangelo wrote:
With d.o moving to git, I'm becoming more interested in how it works.
On a related topic, anyone using git in a way like how subversion does vendor branches? Currently I do a cvs export => svn with svn_load_dirs.pl, and I'd be really interested on any resources on how to best do this with core and contrib code.
Well I'm pretty much ignorant in SVN terminology but in Git, a branch is just a pointer to a given commit. So you can branch as much as you want.
git checkout -b my_new_branch [old_branch]
Now you're on my_new_branch that was created from old_branch. Work on it. The old_branch default is HEAD.
git checkout old_branch
You're back on old_branch. That's it.
Git always copies all files that change in a given commit. It doesn't keep deltas like others SCMs.
--- appa