I have a multi module maven project in which into my .gitignore file i have set the pattern for ignoring target folders as /target/ but when i pushed the code the target folders got pushed too into remote repo.
**MultiModule Maven Project structure:**
Parent module
Child1 module
Child2 module
Now in my remote repo "target" folder is present inside Child1 and Child2 and into my local repo the target folders have some new code which appears on git status command as i have ran my project and it produced new files inside those target folders.Also i tried pushing code again thought it would ignore target folder but it didnt because git is still tracking them.
I have to delete target folders from Child1 and Child2 which are present in remote repo and next time when I make a code push target folders should be ignored from Child1 and Child2 modules . What can I do here to fullfill this requirement?