curious: where does git store user information?

前端 未结 4 830
暗喜
暗喜 2020-12-15 17:30

I\'m wondering where does git stores user information. I created a repository, which both me and my friend works on. When we both commit, we can see both of us as individual

4条回答
  •  北海茫月
    2020-12-15 18:25

    If you do not store user information in your configuration files Git looks in the environment for committer information, using the variables GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_AUTHOR_NAME, and GIT_AUTHOR_EMAIL. In absence of these variables, your username and host name are used to construct a value. So even without any user information stored in configuration files two users will have different committer information.

提交回复
热议问题