Creating a TAR file and excluding some of the dirs

I have been using Git, Node, and Bower as development tools, but they make your project A LOT bigger. So when I back up my project, I don't want to include some of the directories.  I used to delete the 'node_modules' directory and the 'vender' directory (created by bower install) every time I wanted to make a backup of my project. But I just realized that you can exclude files from your archive like this:

tar -vczf my-project.tar public_html/ --exclude 'node_modules' --exclude '.git' --exclude 'vendor'  --exclude '.sass-cache'