4 ms·
Show HN: Vanity Git commit hash generator
Hi HN!
This is just a fun little tool I made after I got nerdsniped by noticing that one of my commits naturally started with "fae". I thought that was cute, so I looked up existing tools that make vanity commit hashes, but none of them seemed great to me (and none supporting signing commits).
I learned a fair deal about how git actually stores commits while making this, and I think I came up with a novel way to generate a vanity hash: adding an extra header to the commit file.
This was just a quick project to satisfy my curiosity, but I thought you all might find it neat. Notice that all the commits in that repo start with "fae0"!
- Anna
- User3456335 3y agoCool idea. Now we just need to get Git to switch to base 64 instead of base 16 hashes so that we have more letters than abcdef105. C0ffee is cool to be able to write though. However, actually having the commits start out with the same letters is problematic and confusing when e.g. specifying commit hashes on the command-line
- mdaniel 3y agoExcellent work! The one I knew about ( https://github.com/tochev/git-vanity https://github.com/tochev/git-vanity ) uses OpenCL and FWIW does claim to support signing: https://github.com/tochev/git-vanity#does-it-work-with-gpg-singed-commits https://github.com/tochev/git-vanity#does-it-work-with-gpg-s... A similar one also used the same technique you did: https://github.com/prasmussen/git-vanity-hash#how-it-works https://github.com/prasmussen/git-vanity-hash#how-it-works Great minds think alike!
- throwaway81523 3y agoNow that git uses sha256, I wonder if it's possible to repurpose old bitcoin mining hardware to find these special hashes.