Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

.env in gitignore

git rm .env --cached
git commit -m "Stopped tracking .env File"
Comment

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
Comment

PREVIOUS NEXT
Code Example
Shell :: env file added to gitignore but git still tracking it 
Shell :: bash assigning to new array 
Shell :: how to remove bin folder from git 
Shell :: how to use ssh to connect to a remote server in linux 
Shell :: digitalocean connect via ssh 
Shell :: how to run pkg file on mac terminal 
Shell :: how to install amplify cli to your react project 
Shell :: write content in file powershell 
Shell :: git create github repo 
Shell :: curl save file 
Shell :: du folder size 
Shell :: file name from path linux 
Shell :: arch linux grub boot loader installed 
Shell :: vim change all spaces to tabs 
Shell :: git set upstream always 
Shell :: netspeed ubuntu 20.04 
Shell :: batch open url 
Shell :: delete from git history 
Shell :: doskey permanent 
Shell :: kali linux download 
Shell :: install admin lte in laravel 
Shell :: move file in terminal 
Shell :: Importing SSH Keys 
Shell :: Jenkins ssh credentials in pipeline 
Shell :: filezilla Directory /var/lib/docker: permission denied 
Shell :: aws lightsail ssl installation 
Shell :: visual studio export installed nuget pacjkages 
Shell :: make zip file command 
Shell :: git logline 
Shell :: ssh permissions are too open 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =