The tar command gives a few possibilities: 1 . General: tar cvfz app.tar.gz --exclude ".git/*" --exclude ".git" <root-dir> 2. GNU tar      To exclude version control system directories:     tar --exclude-vcs This will exclude svn, git metafiles etc. tar cvfz app.tar.gz <root-dir> --exclude-vcs Source: http://stackoverflow.com/questions/3069522/tarballing-without-git-metadata