fixes #5867, replaces #5790: no git hooks

Specify dummy template dir when cloning to prevent copying hooks.