Git 2.13 conditional config on windows

前端 未结 5 1693
失恋的感觉
失恋的感觉 2020-12-28 15:23

Git version: 2.13.0.windows.1

OS: Windows 7

CLI: Git bash

.gitconfig



        
5条回答
  •  無奈伤痛
    2020-12-28 15:40

    The accepted answer, while helpful, does not answer the question.

    As of this writing, includeIf only works inside a git initialized folder.

    So if you cd into "~/Documents/webstorm/corporate/somegitproject" and run the command the output will be as expected:

    $ cd ~/Documents/webstorm/corporate/somegitproject
    $ git config user.email
    corporate@email.com
    

    This is probably a defect against git, since a user would expect this to work similarly in "~/Documents/webstorm/corporate/" as well.

提交回复
热议问题