Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore .env file from .gitignore for laravel5.2

I have written a line

.env

in my .gitgnore file.but still it is not being ignored while the push. My .gitignore file is in root directory of project folder.

like image 457
prashant sutail Avatar asked Oct 18 '22 19:10

prashant sutail


1 Answers

after adding file name in .gitignore, you have to run:

git rm -f .env

It will never appear after in git status, no matter what modification you do in it.

A SUGGESTION, If you do not have good knowledge of unix commands and git, please save your .env file somewhere before playing with it.

like image 152
Abhay Maurya Avatar answered Oct 21 '22 04:10

Abhay Maurya