11👍
✅
You are correct. You should put your .env
file in .gitignore
and create .env
file on server manually – either by connecting to server (SSH) and creating file or transfer file using one of secure transfer protocols (SCP, SFTP).
Source:stackexchange.com