If you want to guarantee to create a "clean" source archive here is an example of creating a new folder containing the source. This example is for v4.14. I think you can replace the tag "v4.14" with "HEAD" in your case:
Code:
git archive --format=tar --prefix=linux-4.14/ v4.14 | (cd /usr/src/git && tar xf -)
Then after you have an existing clean source directory it's much faster to patch it:
Code:
echo "Creating new source directory..."
cp -al linux-$OLD_VER linux-$NEW_VER
cd linux-git || exit
echo "Patching source directory..."
git diff v$OLD_VER v$NEW_VER | (cd ../linux-$NEW_VER && git apply -)
cd ..
Also you can keep a clean source archive (your git tree) by using a separate build directory. Doing it this way you shouldn't have a problem directly building from the git source tree (or also combine with the above):
Code:
make O=$OUTDIR oldconfig
make O=$OUTDIR
You can do all this while you're in the middle of a git bisect.