I made changes in my .env file and wrote after that in terminal git status
:
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .env
I would like that the changes in the .env file be igonored by git so I added this line in .gitignore:
/.env
Now when I write git status
I get the result:
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .env
modified: .gitignore
What can I do now? Why is gitignore not ignored?