When you achieve source code from VCS system (e.g. cvs, svn, git .etc), the following tar option is useful:
--exclude-vcs exclude version control system directories
- As of tar version 1.19, the following files are excluded:
- ‘CVS/’, and everything under it
- ‘RCS/’, and everything under it
- ‘SCCS/’, and everything under it
- ‘.git/’, and everything under it
- ‘.gitignore’
- ‘.cvsignore’
- ‘.svn/’, and everything under it
- ‘.arch-ids/’, and everything under it
- ‘{arch}/’, and everything under it
- ‘=RELEASE-ID’
- ‘=meta-update’
- ‘=update’
for example:
tar -cjf linux.tar.bz2 --exclude-vcs linux