It's the same as any maven project, you can create a .gitignore file for the purpose.
You can create the .gitignore file under each module.
eg. I created under ui.apps folder and put the path inside to ignore
ui.apps>.gitignore
src/main/content/jcr_root/apps/wknd/clientlibs/clientlib-site