flash_gaia: check for git/hg, clean files from git on update