How to use .gitignore correctly

The Most Important Use Cases First things first, how can we exclude every target folder created by Maven in every sub-modu