Mohammed Dawood Mohammed Dawood - 2 months ago 16x
Java Question

Git ignore is not ignoring folder **META-INF**

i'm using git with source tree app i want to ignore the contents of the folder file META-INF like the file persistence.xml


i put the path in .gitignore file

#Ignore META-INF

but the file not ignored by git , how to ignore all files in this folder META-INF


Assuming the files are already being tracked by Git, you must do the following:

  1. Fix .gitignore so it is ignoring the META-INF folder

  2. Remove the files that should have originally been ignored

    git rm --cached -r
    git add .