I have a bunch of files that should not be under version control. However, if I don't bring them under version control then my build fails. As those files contain key/value content, I added those files in but replaced the actual values with a fake value. Therefore, I am able to get my build passed and also I have not those actual key/value under VC. I committed this change into the VC. I also put the list of those file under .gitignore file like this:
/app/src/main/assets/*.json
/app/src/main/assets/*.kt
Now the problem is that In order to test my change I need to replace those fake files/values with the actual ones. However, by doing so, I get those files in the list of changed files when I run git status
.
I clearly added them under .gitignore
so why I see them here again? This is what I see:
hesam(dev)$ git status
On branch dev
Your branch is up to date with 'origin/dev'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: app/src/main/assets/EmergencyContacts.json
modified: app/src/main/assets/LocationOfSites.json
modified: app/src/main/assets/LocationOfHospitals.json
modified: app/src/main/assets/LocationOfOffices.json