First, and not related to your question, I would urge you to urgently stop to use root
logins and su
and use user logins and sudo
instead. Restrict your root
logins to console only, or not even that.
That said, git commit
has a --author
option that can help you there:
# git commit --author='Author Name <author@email.address.com>' -a
You can also carefully use environment variables per user to set GIT_AUTHOR_NAME
and GIT_AUTHOR_EMAIL
variables. In the log, it will appear different authors and the same commiter (root@host
), but it will give you more auditing. Of course that means you trust your admins to keep the variables intact. As each one is using a specific shell, they can sudo
to root and source a file with their specific git
variables, identifying each one differently on the commits. Not very practical, but you may even automatize that with scripts.
EDIT: Of course an even better approach as appointed by @ScottPack would be to use a configuration management system like Puppet or Chef and use git to track the changes on the central server and not on the real servers so each admin could have a working copy of the configuration.