Unlike the linked it didn't alter the commit date, but altered the Git
code itself to add a new custom header to the commit object.
Git handles custom headers just fine since it ignores unknown headers
for future compatibility. This commit still lives in the main Git repo
at work without any issues:
> git commit -F message
Try 0/4000000 to get a 1337 commit = 3650e08c9e1ecbbeec83daf7a959e3edcf15bd4f
Try 100000/4000000 to get a 1337 commit = 3952f7d5035f5e88f66aa5c70e5cc11fdd734852
Try 200000/4000000 to get a 1337 commit = 51c910f5d535c515a04796eb7c7a70cbd2325599
Try 300000/4000000 to get a 1337 commit = d70c3e64b1d963461a6ee2f518c613483b979d68
...
commit id = 313378458f8c4fb53c808f4b0bae5bf71ba5e23b
[master 3133784] 1337 Test Commit
1 file changed, 60 insertions(+), 35 deletions(-)
Comments
Here's a patch I submitted purely for discussion to add a feature to Git to allow for vanity commit hashes back in 2011, it generated some interesting discussion: http://lists-archives.com/git/756392-choosing-the-sha1-prefi...
Unlike the linked it didn't alter the commit date, but altered the Git code itself to add a new custom header to the commit object.
Git handles custom headers just fine since it ignores unknown headers for future compatibility. This commit still lives in the main Git repo at work without any issues:
Testing it out:
https://github.com/spence/git/commit/313378458f8c4fb53c808f4...Right, and now you can use "git show --pretty=raw" to see the commit header:
There's replies in that thread where the naïve technique I was using was improved a lot.