Whats the reason to build your own command structure for filename, author, etc. instead of using the existing git tools like `git format-patch` and using `git am` for applying patches?
See git-send-email and git-am.
Emailing the entire new file every time will not work in anything but local tests as it cannot handle change conflicts. The format needs to know which parts of the file you changed, so your change does not accidentally undo other changes merged ahead of you.