I am working on a maven project and I want to ignore the files generated and stored in the /target folder of my project (Evaluation) root folder.In the root of my git repository
If the files have already been added or committed to your Git repository, you must first stop tracking them before they will be ignored by .gitIgnore.
To stop tracking files in SourceTree:
Right-click on files. Choose "Stop Tracking".
(this won't delete your files, it just stops tracking them)
To stop tracking files from Command-line:
git rm --cached example.txt