Simplify build/upgrade script, by default keep .git folder.