4

I have this .gitignore file in my android project but does not apply to the .cxx folder. I tested everything but failed.

.cxx
app/.cxx
app/.cxx/

Android Studio

enter image description here

We had trouble working with my colleagues on this project as they changed .cxx files each time the project was build.

How can i fix this problem ?

Mohammad ZF
  • 113
  • 1
  • 10
  • 2
    Does this answer your question? [How to make Git "forget" about a file that was tracked but is now in .gitignore?](https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore) – EncryptedWatermelon Oct 30 '19 at 14:47

2 Answers2

4

I would try something like:

*.cxx
app/.cxx/*

And before that make sure these files are not already tracked by git, once the file is in, .gitignore does not do anything for that file.

lenik
  • 23,228
  • 4
  • 34
  • 43
1
git rm --cached -r .
git add .

This command will ignore the files that have already been committed to a Git repository but now we have added them to .gitignore.

Srinivas
  • 21
  • 6