Can I configure git so it does not guess user.email configuration settings?

后端 未结 5 1995
余生分开走
余生分开走 2021-02-14 14:39

On my system I don\'t have the user.email git configuration value set at the global level, on purpose. Instead, I configure it individually in each sandbox. This is

5条回答
  •  没有蜡笔的小新
    2021-02-14 15:29

    It doesn't look like this is possible. From git-commit-tree(1):

       While parent object ids are provided on the command line, author and committer
       information is taken from the following environment variables, if set:
    
           GIT_AUTHOR_NAME
           GIT_AUTHOR_EMAIL
           GIT_AUTHOR_DATE
           GIT_COMMITTER_NAME
           GIT_COMMITTER_EMAIL
           GIT_COMMITTER_DATE
           EMAIL
    
       (nb "<", ">" and "\n"s are stripped)
    
       In case (some of) these environment variables are not set, the information is
       taken from the configuration items user.name and user.email, or, if not
       present, system user name and the hostname used for outgoing mail (taken from
       /etc/mailname and falling back to the fully qualified hostname when that file
       does not exist).
    

    Perhaps it's easier for you to configure environment variables for each sandbox?

提交回复
热议问题