LucasClay718
LucasClay718

Reputation: 11

.env file not gitignored. I had someone do it manually for me once

So im currently working on a project and my my .env file is not greyed out (gitignore?). Trying to figure out what I need to do globally because I do have the file but my .env is never greyed out. Any suggestions? I can provide screenshots if needed.

I had someone do a a few commands in the terminal and was able to get my .env to go grey once. But I believe he told me he wasn't able to do it globally.

Reach out for help.

Upvotes: 1

Views: 610

Answers (1)

VonC
VonC

Reputation: 1323115

First, make sure your .env is not already tracked (or any amount of .gitignore or core.excludesFile would not change anything)

cd /apth/to/.env
git rm --cached .env

Then check if it is currently ignored with:

git check-ignore -v -- .env

Upvotes: 0

Related Questions