I use Git GUI to verify the changed files and changes done before submitting them. One of the problem I face is that .class, .jar & .target files gets listed in the “Unstaged Changes” and it becomes difficult to scroll down and find out the files that are actually modified, added or deleted.
To resolve this, I created a .gitignore file and placed it where .git folder is located in my workspace. For instance if I am working on a project odl-shape-service, I will have .git folder directly under the folder “odl-shape-service” and this is where I will place .gitingore file. This is how .gitignore file looks like:
# Ignored files
Now it ignores all the files that are mentioned here i.e. .class, .jar, .lst, target folder and any files that are under target folder.
For further reference this link can be referred.