In SO, there are some questions related how to get Git automatically append file change details (e.g. author, date, version number, short description of change, etc), using similar kind of keywords/tags/hashes as is used in RCS/CVS and most other systems. There were no clear answers, how to do this - mainly there were warnings to not do it.
I do realize that it is possible to get the same information using Git's own history methods, but in this real life, when programmers have used to old methods, it just makes the life easier when file's version history is embedded to file's header.
Question: how can the change information be automatically inserted into file header during commit phase?
Because you are supposed to get that information from Git itself, not from the file content (managed by Git)
That being said, I have seen alternative approaches, like generating a file will all the Git metadata you need in it (done after all commits), and packaged in the deliverable, meaning:
That way, your final program can still access those metadata during its execution.