Is it possible to have different Git configuration for different projects?

前端 未结 12 773
萌比男神i
萌比男神i 2020-12-02 03:44

.gitconfig is usually stored in the user.home directory.

I use a different identity to work on projects for Company A and something else fo

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 04:15

    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.

    (By default, git config modifies .git/config, not ~/.gitconfig - only with --global does it modify the latter.)

提交回复
热议问题