I already do have it in my personal gitignore (.git/info/exclude) which works fine. I just thought there might be a lot of people using clangd, and I thought it might be handy to put it in for everyone. 

I'm just interested in hearing what others think; thank you for your response Steven

On Fri, Aug 20, 2021, 1:48 AM Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Jack DeVries writes:

 > What does everyone think? Can we add these two items to the .gitignore:
 >
 > - `.cache`
 > - `compile_commands.json`

I don't see any cost to this -- .cache is uncomfortably generic, but
given the semantics of "cache" gitignoring it seems a good idea.

ISTM rather than have every project add these to the project-specific
gitignore this is really something every clang user should have in
their personal gitignore for best effect.  As long as they don't
though, having the project do it will avoid inadvertantly git-adding
these objects.

Steve