0

I have a file googleservices.plist inside ios/Runner/here I want to git to ignore the file. I have added

ios/Runner/googleservices.plist

to the .gitignore file. But it still doesnt ignore the file.

  • 1
    Did you add your .gitignore before or after staging? – Saeed Ahadian Jul 11 '20 at 18:19
  • If you stage the file and then attempt to ignore it, what is getting ignored is actually the further changes that you make to that file. The file still gets staged but new changes to the file won't. I guess that might be the case here. – Saeed Ahadian Jul 11 '20 at 18:21
  • if staged the file and committed it once.Now I want git to ignore the changes.But it isn't ignoring. – TECH WITH KEVAL Jul 11 '20 at 18:23
  • If you cached the file already than I you have to untrack the file like here. https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore – DasLukas Jul 11 '20 at 18:23
  • @TECH WITH KEVAL The solution that comes to my mind is to revert to the previous commit and stage files again with your new .gitignore. follow [this link](https://stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit) – Saeed Ahadian Jul 11 '20 at 18:26

0 Answers0