Github remove env file from history

In this article let’s discuss about Github remove env file from history. Let’s go through the following methods without any delay.

Method 1:

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

Hope the above solution works.

Realted Posts : E: could not get lock /var/lib/dpkg/lock-frontend – open (11: resource temporarily unavailable)