Ignore node_modules when pushing to server

Is there a way to ignore the node_modules folder when pushing a site from local to wpengine?

I would like to know how to do this as well.