One use for tarballs is distributing source code. Much source code is maintained using version control systems such as subversion, Git, mercurial, and CVS, (refer to the previous chapter). Code directories under version control often contain special directories such as .svn or .git. These are managed by the version control application and are not useful to anyone except a developer. Thus, they should be eliminated from the tarball of the source code being distributed to users.
In order to exclude version control related files and directories while archiving use the --exclude-vcs option along with tar. Consider this example:
$ tar --exclude-vcs -czvvf source_code.tar.gz eye_of_gnome_svn