Skip to content

Instantly share code, notes, and snippets.

@lopugit
Created September 4, 2018 01:14
Show Gist options
  • Save lopugit/14f28b7e4db8225fcff32b990c19a2bb to your computer and use it in GitHub Desktop.
Save lopugit/14f28b7e4db8225fcff32b990c19a2bb to your computer and use it in GitHub Desktop.
Delete large file from github history when dealing with remote rejected pre-receive hook declined Large files detected this exceeds GitHub's file size limit
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch <file/dir>' HEAD
@alexpapworth
Copy link

Thanks! Needed exactly this line.

@lopugit
Copy link
Author

lopugit commented Dec 8, 2019

Thanks! Needed exactly this line.

haha I'm so happy it helped you, I added as many keywords and the exact error that comes up in the hopes it would help someone one day :D

@qvandenberg
Copy link

Another fan here :)

@cozmik
Copy link

cozmik commented May 9, 2023

after almost a whole day on this... thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment