If you use in your scripts working tree contents, scripts use what you checkout before using scripts. Checkout simply ensures that the working tree will look like as it was at the required revision.
But if you use in your scripts git calls - for example git archive, you have to make an adjustment in those scripts.
This sounds like compiling directly in the GIT tree rather than copying "out of source." I am and have been following the wiki to copy the sources to a different location to build "out of source."
Darrell