I'm using git's branching feature to manage 5 variations of a small website. There are 5 versions that will all be live in different subdirectories on production. My approach to checking out the various branches to their respective folders was to:
mkdir foo && cd foo
git init
git remote add origin git@...:project.git
git fetch origin foo:foo
Where "foo" is a given branch name. This was fine, except for that it pulled my entire repo (designs, as3 source, etc...) into those branch folders instead of just the public www folder, which is the only thing I really want on production.
Is there a cleaner way to handle this? Git can't clone subdirectories right?