[cmake-developers] git branches and cmake build trees

Alexander Neundorf neundorf at kde.org
Fri Apr 9 15:30:24 EDT 2010


what is a good way to handle git branches and cmake build trees ?

With cvs/svn, I check out the branches I want into different source 
directories, and then create build directories. Each build directory is tied 
to a source directory, which is via CVS/svn tied to a branch.

How do I handle this with git ?
If I understand correctly, the idea with git is to have 1 cloned repository 
locally, and then create all the branches I need in this repository, and then 
switch between the branches while staying in the same source directory and 
just use git to switch the branch.
But this means that if I want build trees for different branches, then they 
all refer to the same source directory ? And I have to take care manually 
that my (one) source directory is in the right branch currently ?

To have multiple source directories, I need multiple clones, right ? 
Does this mean I have to clone the cmake repository once for each branch I 
want ?
How do you handle this ?


More information about the cmake-developers mailing list