How to remove large file from git history

In this article let’s discuss about How to remove large file from git history. Let’s go through the following methods without any delay.

Method 1:

bfg --strip-blobs-bigger-than 100M .
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar but have a try!

Method 2 :

$ git gc --prune=now --aggressive

Hope the above solution works.

Realted Posts : How to upgrade pihole