back

by JNRowe·5y ago·view on hn ↗
You can ensure the hashes are consistent by setting GIT_AUTHOR_DATE and GIT_COMMITTER_DATE in your initial commit alias.

They still won't be consistent if you've enabled commit.gpgSign though. So, you'd want --no-gpg-sign on that initial commit or someone to reply with a better idea.

1 comments
Thanks, incorporated your --no-gpg-sign suggestion. I think it's best to use a canonical author/committer as well. Ideally everyone would agree on something so tooling like commit linters (which check org email addresses or commit message formatting) can ignore it and different repos across at least a single org benefit from having the same root commit.
The other benefit to your full solution is that you won't get a 50 year sidebar in your GitHub contribution profile too.

Until seeing your suggestion it hadn't occurred to me to use a fake user. However, using UNIX epoch was something I had been doing and I do have the 50 year sidebar ;)

https://github.com/JNRowe#year-list-container