Git

I've been playing around with Git, with several end goals in mind:

However, the layout of Dojo's Subversion repository has made it very challenging to import into Git.

... or, alternately, the other recommended layout for Subversion looks like this:

You can then set these up as git submodules underneath a regular git repository.

We want to normalize this directory structure, so that our other applications can depend upon the dijit, dojo, dojox, and util directories being available, whichever branch we want to check out. We want a tagged version to look the same as a branch (aside from changes to the code), and also the same layout as the trunk version. So we want to have a persistent "trunk" branch that contains the trunk versions of dijit, dojo, dojox, and util. But how?
There are several steps to get there:

git svn init http://svn.dojotoolkit.org/src -t tags -b branches
... then edit the .git/config to add the other remotes:

So we'll leave the branches and tags for later--we want the trunk so we can get started.
git svn fetch dojo
git svn fetch dijit
git svn fetch dojox
git svn fetch util
... each of these will search back and pull down the entire history of the trunk branch--but at least we don't need to wait for this to happen to all the tagged versions. Yet.

First, create our trunk branch, and make it empty:
git checkout -b trunk
rm -Rf *
git commit -a
... so we should now have an empty branch to work in. Next, we're going to do the following process for each module:

Now repeat for the other modules:
git merge -s ours --no-commit dijit-trunk
git read-tree --prefix=dijit/ -u dijit-trunk
git commit -m "merge dijit into trunk"
git merge -s ours --no-commit dojox-trunk
git read-tree --prefix=dojox/ -u dojox-trunk
git commit -m "merge dojox into trunk"
git merge -s ours --no-commit util-trunk
git read-tree --prefix=util/ -u util-trunk
git commit -m "merge util into trunk"
Done! You now have a trunk with each of the 4 modules loaded. You can pull this into your other projects.

This is, however, a simple step:
git svn fetch
... and let it grind away.

Finally, it's time to update our trunk branch:
git checkout trunk
git pull -s subtree ./ dojo
git pull -s subtree ./ dijit
git pull -s subtree ./ dojox
git pull -s subtree ./ util

So to switch to a tagged release the first time, simply do:
git checkout -b release-1.1.1 tags/release-1.1.1
... and to go back to trunk,
git checkout trunk
After you've created the branch, you can just do:
git checkout release-1.1.1