git rm --cached private.xml git add -u . git commit -m "Record deletion of private.xml from the index"
Then you can add it in the .gitignore (no need for '*')
private.xml
https://stackoverflow.com/questions/30475920/git-ignore-is-not-ignoring-the-netbeans-private-files