Use shallow clone / fetch

To avoid cloning / fetching a huge repository into a staging dea,
use shallow clone / fetch option with git command.
Fix shallow fetch to cope with various refspecs
Leave .git untouched