[cmake-developers] git branches and cmake build trees

Brad King brad.king at kitware.com
Fri Apr 9 16:16:45 EDT 2010


Michael Wild wrote:
> A single clone and multiple binary trees in combination with ccache

Since CMake builds in less than 1 minute on my computer I just use
a single source tree and build tree for all branches.

For bigger projects, you can use local clones as Michael suggested
first:

  git clone git://cmake.org/cmake.git CMake
  git clone CMake CMakeMyWork1
  git clone CMake CMakeMyWork2
  ...

This will use hard-links to save disk space locally.  However,
the "origin" of the latter clones will point at the first one.
This is easily corrected by using

  git config remote.origin.url git://cmake.org/cmake.git

or just being careful about how you fetch/push in each repo.
In call cases you can still configure the same pushurl:

  git config remote.origin.pushurl git at cmake.org:cmake.git

in every repo.

-Brad



More information about the cmake-developers mailing list