Search code examples
firebase-realtime-databasegitignoregit-pushundo

My gitignor file did not stop push to GitHub files


I learn git and Github and now I added this rule

# misc
.env.production
.env.development
.env

But when I pushad to GitHub this gitignore file and both .env.development and prod. was pushed also very annoying I have to delete Firebase app I think.

What did I do wrong?


Solution

  • If a file is already tracked in a git repository, .gitignore has no effect. With that said, there is no need to hide Firebase Api keys. source