When releasing versions of code to the customer it would be helpful to know the specific commit a copy of the code came from. Is it possible with 'git archive' to have the resulting .zip file include a readme.txt or some other indicator that shows the hash of the commit that was used?
I'm relatively new to git, having migrated from Mercurial. In Hg when it generated an archive the zip would include an hg_archive.txt with the hash indicating exactly where the archive was generated.
Thanks
It's already there. See https://git-scm.com/docs/git-archive:
In ZIP files commit ID is stored as a file comment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With