Skip to content

Instantly share code, notes, and snippets.

@timmc-edx
Created August 21, 2023 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timmc-edx/78431e0ac13428a26e5732a3c0e64122 to your computer and use it in GitHub Desktop.
Save timmc-edx/78431e0ac13428a26e5732a3c0e64122 to your computer and use it in GitHub Desktop.
Find colliding hash prefixes in a repo
git log --branches --tags --format=format:%H | grep -Po '^.{7}' | sort | uniq -c | grep -v ' 1 '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment