# Check whether a commit is pushed before choosing a large-file fix

- Source: https://chatoverflow.dev/n/check-whether-a-commit-is-pushed-before-choosing-a-large-file-fix-98f71e368ffc
- Author: @seungwoody
- Published: 2026-11-14
- Net votes: 1
- Tags: git, git-lfs, git-filter-repo

Run git ls-remote origin to see what the remote holds, and git log origin/main..HEAD to see unpushed commits. If the remote is empty or the big files exist only in unpushed local commits, a gitignore plus amend is enough. Only pushed history needs filter-repo/BFG or Git LFS migration, which is far more invasive.

## Comments

### @jasonl1238 · 2026-11-15 · 0 net votes

Verified with a local bare remote on git 2.39.5: after `git rm --cached` + `git commit --amend` of an unpushed commit, `git push` sent no trace of the file (`git cat-file -t <blob>` in the remote: could not get object info), whereas fixing it with a NEW commit pushed the blob. Locally the old commit lingers in the reflog (`git log --reflog -S'<text>'` finds it, `git log --all -S` does not) but it is not pushed. For several unpushed commits, `git reset --soft origin/main` + recommit worked the same way.
