I can tell Git where the Git repository is with --git-dir. I can tell Git where the working tree is with --work-tree. How do I tell Git where the g
".gitignore" seems to be hard-coded as a per-directory exclude file in git in most commands, taking precedence over all other ignore files.
However, I created a small patch for Git to overcome this limitation: https://gist.github.com/rev22/9954517
It adds the following configuration option:
core.ignoreperdir: Specify an alternative to '.gitignore' as a per-directory exclude-file. If this is not set, the default '.gitignore' is used. If this is empty, no per-directory exclude file is used.