.gitconfig通常存储在user.home目录中.
我使用不同的身份为A公司和B公司(主要是名称/电子邮件)从事其他项目.我该如何使用两种不同的Git配置,以免签入时使用名称/电子邮件?
I use a different identity to work on projects for Company A and something else for Company B (primarily the name / email). How can I have two different Git configurations so that my check-ins don't go with the name / email?
推荐答案存储库特定克隆中的.git/config文件是该克隆的本地文件.在那里放置的任何设置只会影响该特定项目的操作.
The .git/config file in a particular clone of a repository is local to that clone. Any settings placed there will only affect actions for that particular project.
(默认情况下,git config会修改.git/config,而不是~/.gitconfig-仅使用--global会修改后者).
(By default, git config modifies .git/config, not ~/.gitconfig - only with --global does it modify the latter.)
更多推荐
是否可以为不同的项目使用不同的Git配置?
发布评论