GIT is pretty powerful. I use it on a daily base at the moment. Furthermore I watch the mailinglist. Therefore I discovered a simple workflow that is not yet implemented nicely in GIT: cloning of a particular branches.
I wanted to clone the cvs-imported PHP_5_3 branch of PHP, which is provided by Johannes Schlüter. But at the moment git-clone just supports cloning of complete repositories. So I asked myself how do clone just a certain branch. At the same time somebody came up with a similar issue at the git mailinglist. Linus came up with a simple batch of commands (git-remote, etc) to be executed to get the result.
I finally decided to write a small git-clone-branch.sh script which does this job, supporting multiple branches to be cloned from a certain repository. (more…)