rengine
rengine copied to clipboard
feat: remove .env from index and create .env-dist
Is there an existing feature or issue for this?
- [X] I have searched the existing issues
Expected feature
@yogeshojha You should remove .env from git index, and create a .env template called, for example, .env-dist
Because you've add the .env to .gitignore but as the file is in the git index the ignore does not work.
By adding a file .env-dist, user can rename it to .env, change values and this does not trigger a git change
What do you think of this ?
Alternative solutions
No response
Anything else?
No response
👋 Hi @psyray, Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.
I think we can fix this ourselves. If you create a PR, I'll merge it into my fork.
What's the right way to remove from index but not delete it for user at git pull ?
What's the right way to remove from index but not delete it for user at git pull ?
Hmm, not sure actually, never experimented with that before. But you do have a point: you want to pull new changes to the .env file, but only the keys, not the values. Renaming could be an option, but I could also see people getting very confused or not following the steps correctly. Maybe automate this in some way?
Yes, more complicated than it looks. Need some test