After adding .env to the .gitignore file, use
git rm -r --cached .env
to remove it from git. To remove it completely from the history use
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
git push --force
After adding .env to the .gitignore file, use
git rm -r --cached .env
to remove it from git. To remove it completely from the history use
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
git push --force

Mark Wong is a front end developer with 10+ years experience. Most of his knowledge of HTML5, CSS and Js is self taught.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
Leave a Reply