rengine icon indicating copy to clipboard operation
rengine copied to clipboard

feat: remove .env from index and create .env-dist

Open psyray opened this issue 2 years ago • 5 comments

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

psyray avatar Oct 16 '23 14:10 psyray

👋 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.

github-actions[bot] avatar Oct 16 '23 14:10 github-actions[bot]

I think we can fix this ourselves. If you create a PR, I'll merge it into my fork.

AnonymousWP avatar Oct 18 '23 12:10 AnonymousWP

What's the right way to remove from index but not delete it for user at git pull ?

psyray avatar Nov 21 '23 13:11 psyray

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?

AnonymousWP avatar Nov 21 '23 14:11 AnonymousWP

Yes, more complicated than it looks. Need some test

psyray avatar Nov 21 '23 19:11 psyray