Is it possible to do a Git Commit with the user being the current SSH user? -
us in our team have our own ssh usernames use log in our dev server. when git commit though (without specifying author), author of course becomes --global user.name set.
but possible automatically use current ssh user git author? can set default global user.name this. purpose when commits dev server, we'll know right away did , not see dev@oursite.com. thank you.
yes, @ least in workaround, can commit author option
--author=<author>
and add alias section gitconfig
[alias] ci= !git commit --author="\"env_author\""
if call
env_author="a <b@c.d>" git ci
it use content of variable env_author
author string. now, fill value in login profile scripts each user or magic whoami
, don't know.
Comments
Post a Comment