Skip to content

Instantly share code, notes, and snippets.

@kostyrev
Created November 15, 2017 19:27
Show Gist options
  • Save kostyrev/08433aa4130c14f3e2351a87a26b0938 to your computer and use it in GitHub Desktop.
Save kostyrev/08433aa4130c14f3e2351a87a26b0938 to your computer and use it in GitHub Desktop.
list deleted files from .git
git rev-list --all --objects | sed -n $(git rev-list --objects --all | cut -f1 -d' ' | git cat-file --batch-check | grep blob | sort -n -k 3 | tail -n1 | while read hash type size; do echo -n "-e s/$hash/$size/p "; done) | sort -n -k1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment