Interview Prep/Git & GitHub/Push, Pull and Fetch Errors

`remote: error: File data/dump.sql is 138.42 MB; this exceeds GitHub's file size limit of 100.00 MB`

IntermediateTroubleshootingPush, Pull and Fetch Errors
Answer

Likely causes → A commit in the push contains a file over 100 MB. Deleting it in a later commit does not help, since the blob is still in the pushed history.

Diagnose →

git rev-list --objects origin/main..HEAD | \
  git cat-file --batch-check='%(objectname) %(objectsize) %(rest)' | sort -k2 -n -r | head
git log --oneline -- data/dump.sql

Fix → Remove it from the unpushed commits (git rebase -i, or git filter-repo --path data/dump.sql --invert-paths for older history). Re-add via Git LFS if it must be versioned: git lfs track then git lfs migrate import --include="data/dump.sql".

Prevent → Add the pattern to .gitignore, and use a pre-commit check-added-large-files hook.

All Git & GitHub questions Roadmap: Git & GitHub

More on Push, Pull and Fetch Errors