Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to add .env to gitignore

In your Root Directory do the following Inscrutions :

1- Create ".gitignore" !!Attention!! it might be alredy there":
Widnows : $ echo "" >.gitignore
MacOs :   $ touch .gitignore

2- Create ".env" file :
Widnows : $ echo "" >.env
MacOs :   $ touch .env

3- Add .env to ".gitignore" :
Windows && Macos : $ echo ".ev" >> .gitignore

"Warning!!!!": If your ".env" is already part of your "Git repository", 
adding it to ".gitignore" will not remove it. In this case 
you’ll also need to tell "Git" to stop tracking ".env" : 
$ git rm --cached .env
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #gitignore
ADD COMMENT
Topic
Name
2+6 =