Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

remove .env file from git history

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD

# If it is available on remote repo
git push --force
Source by daily-dev-tips.com #
 
PREVIOUS NEXT
Tagged: #remove #file #git #history
ADD COMMENT
Topic
Name
6+8 =