.env keeps hiding itself

So, I wanted to play around with the Github options, and exported my project to a repo. I then cloned the repo to my computer, did some development locally and pushed it back up to Github.

I reimported the project from Github, and realised that the .env had disappeared. Fine - I don’t expect all of the potential conflicts from importing/exporting projects here there and everywhere should be resolved automatically, the ‘export’/‘import’ is a one way operation.

So. I recreated my .env file, and put back in my secrets, and did some coding. When I came back to my project later, the project ran (it would error out if the .env file was missing), but the .env file was no longer visible in the file list on the left.

I recreated the .env file a couple of times, and the same thing keeps happening.

Any ideas on what might be causing this?

Is your .env file listed in your .gitignore? We currently exclude files listed in .gitignore from displaying in the editor, but we should make an exception for .env!

Ha! That is probably why! Thanks :smiley:

Is there a global gitignore that’ll stop me checking in my secrets then?

Here’s a good link to how to create a global .gitignore for your local machine: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore

We plan to make a special case for .env in HyperDev since we already exclude it from import/export, so in the future it should still be visible in the editor for you even if you have .gitignored.