I have a directory want to backup, but there is a .git folder I don't want to compress it anymore. So I did tar command as below:

tar -cjf your_dir.tar.bz2 your_dir/ --exclude='your_dir/.git'