logoalt Hacker News

PunchyHamsteryesterday at 6:10 PM0 repliesview on HN

another useful snippet

    [includeIf "hasconfig:remote.*.url:[email protected]:*/**"]
    path = /home/dir/per/company/config
allows for remote specific configs, overriding say email or other required options depending on where you send contributions - without having to have per repo config

works for dir too

    [includeIf "gitdir:/home/user/src/work1/"]
Git is REAL bitch about exact syntax here; the first snippet won't work with just :*, it needs :/* ; the second won't work without trailing slash