I'm working on a large open source project with rapid development and very long compilation time. My question concerns how to minimise recompilation after getting the newest changes from master.
Say I have
/--MyDev1
/
A (=master)
\
\--MyDev2
MyDev1 and MyDev2 only touch a few files, so if I have a compiled version of A, MyDev1 or MyDev2, doing a checkout to any of the other and running make is pretty fast.
After a few weeks, master has moved forward a lot, upstream. Several hundred files have changed: I checkout master, pull the newest changes, run make, and grab a few dozen cups of coffee.
Afterwards, I want to do a merge that would result in the world looking something like
/--MyDev1--------MyDev1'
/ /
A----....---------B
\ \
\--MyDev2--------MyDev2'
However, If I simply do:
git checkout MyDev1 git merge master make
Then make will recompile everything, since all the files between A and B have been touched. And drinking that much coffee will make me sick.
What I want is to merge from B, and where git only touch the files changed between A and MyDev1 (and afterwards the same for MyDev2, possibly recompile everything between MyDev1 and MyDev2).