Revert "Don't clear the env when invoking build"

This reverts commit 3c80ef2ff7d3c90ff853a069b2eadef2519d27fd.
Move the git bootstrap earlier