I have a script that copies some files from a git repository of mine on a remote server. For every file that is copied, if it is under version control, I want to generate a line, like:
Filename: <filename>, commit: <last-commit-hash>, date: <date of last commit>
The idea is to store these lines in a file and copy it as well on the remote server. This way I can always know which file on the server belongs to which commit on my git repository. Is there a quick way to do that?