My .gitignore file looks like this, however it is not ignoring target folder,
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
#Compiled target packages
######################
target/
project/target/
.idea/
.idea
.idea/workspace.xml
Any help will be highly appreciated. Thanks.