Mohammed Dawood Mohammed Dawood - 1 year ago 254
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

Answer Source

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 .
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download