git - Is it possible to include a file in your .gitconfig -


i'd include file in .gitconfig has github settings - possible?

can this:

[core]     include = /path/to/file 

git (1.7.10+) supports syntax in .gitconfig:

[include]     path = /path/to/file 

see here detailed description of git change , edge cases.

by way, couple of subtleties worth pointing out:

  1. environment-variable expansion, e.g. $home, not supported. (expansion of ~ appeared in git 1.7.10.2.)

  2. if relative path specified, relative .gitconfig file has [include] statement. works correctly across chained includes -- e.g. ~/.gitconfig can have:

    [include]     path = subdir/gitconfig 

    and subdir/gitconfig can have:

    [include]     path = nested_subdir/gitconfig 

    ... cause subdir/nested_subdir/gitconfig loaded.

  3. if git can't find target file, silently ignores error. appears design.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -