mercredi 22 avril 2015

How can I add a xml file from /res/values to my gitignore in my Android project?

I added a separate xml file to my /res/values folder which contains a secret api key that my app uses.

api_key.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="api_key" type="string">my_key</item>
</resources>

Now I would like to exclude it from git. How can I do that?

I added this line to the .gitignore file in my project root

/app/src/main/res/values/api_key.xml

but it does not work. The file still appears on Github after pushing the project content.

Aucun commentaire:

Enregistrer un commentaire