From: Joey Hess Date: Wed, 10 Oct 2018 14:34:27 GMT Subject: Re: bug when combined with etckeeper Message-ID: <20181010143427.GA2725@kitenet.net> In-Reply-To: <4d7cddf8-34b3-eaa4-dc9e-e190062e6135@autistici.org> /etc/.git/hooks/pre-commit is installed by etckeeper and runs etckeeper pre-commit, which deals with /etc/.etckeeper, including running "git add .etckeeper". Why that file would match a gitignore seems much less important than why git would run that hook in an entirely different git repository. core.hooksPath By default Git will look for your hooks in the $GIT_DIR/hooks directory. Set this to different path, e.g. /etc/git/hooks, and Git will try to find your hooks in that directory, e.g. /etc/git/hooks/pre-receive instead of in $GIT_DIR/hooks/pre-receive. Hmm, the example "/etc/git/hooks" there is very similar to the "/etc/.git/hooks" used by etckeeper. So my guess is you have core.hooksPath set globally. -- see shy jo