'I pushed .env file in git without .gitignore in my node project. how can I remove it from my github? [duplicate]

I tried this method [https://daily-dev-tips.com/posts/removing-a-env-file-from-git-history/] but still .env file showing on my git repo.



Solution 1:[1]

you have to add it in the .gitignore file

remove it on your local or change its path (you will see changes)

then commit the changes and push them

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1