How to ignore persistence.xml in gitignore?

0

I have a persistence file called persistence.xml in paths:

  

/git/myRepository/MyProject/src/main/resources/META-INF/persistence.xml

And I would like to include it in .gitignore , I put this path in .gitignore , I did commit and push, but persistence is still seen by git, what should I do to be ignored in GIT? Just remembering that I'm using GitHub .

    
asked by anonymous 03.06.2016 / 19:14

1 answer

1

You need to reload your .gitgnore from Github:

First make any changes to your code , then run the following commands:

git rm -r --cached .

This removes the changed files from the index (staging area), then just run:

git add .

Then commit:

git commit -m ".gitignore esta atualizado agora"
    
03.06.2016 / 19:48