DEV Community

Discussion on: Day 15 of 100 - Exercise Log MERN stack application

Collapse
 
kristianroopnarine profile image
Kristian-Roopnarine

Cool application! Just wanted to give you a heads up, when you commit a .env to github, remove the file and then push those changes, people can still see the removed .env! Remember to add a .gitignore in the root and put any files or directories in there that you want git to ignore. Keep up the grind!

Collapse
 
jameshubert_com profile image
James Hubert

Thanks so much for telling me about this Kristian. As you suggested I changed the API key and ran through the steps using git filter-branch to remove the file from the past commit.
I thought I deleted it last night manually from the repo after realizing I hadn't added it to .gitignore but obviously committing a new change doesn't affect a previous commit.
Thanks again.