-3

It is probably asked numerous time and answered even more time. I understand I need to use

git rm --cached file_name

But my problem is that above command changes file status to deleted and if I push this commit to live and pull it my .env file will be deleted and hence my site will be down immediately. I cannot afford to go down even for a split second. What can be done in this case.

Thanks

Talha Malik
  • 1,509
  • 3
  • 22
  • 44

1 Answers1

0

just create copies of .env and rename based on your location & requirement.

iSensical
  • 747
  • 5
  • 8
  • So there is no GIT approach? – Talha Malik Sep 16 '16 at 06:38
  • There is git way, if its already committed follow this http://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files then add this file into gitignore, assuming you have .env file on server present you just want not to send your .env file from local to live – iSensical Sep 16 '16 at 11:23