How to hide .env file from Github
I am using dotenv for my rails project to store API keys. I have a dotenv gem in my gemfile generated by .env at the root of my application and I have the API keys listed there. However, when I click on github I notice that the .env file still exists. Did I miss a step? How to hide .env file from uploading to github.
Thank!
source to share
Create a file named .gitignore
in your project's root directory (it may already exist) and add .env
to your own line in the file.
Also, if you've already added it to your repository, you'll have to add the file in .gitignore
as above and then clear your Git cache. You can find information about this in fooobar.com/questions/405 / ... .
source to share