With the help of this answer and this post I already got a basic idea how to share hooks with the full team. The remaining "problem" with those two approaches is that everyone needs to run git config core.hooksPath <path hooks under version control>
. It is of course easy to forget this (especially when making a fresh clone) so I'm searching for something that will automatically do this. I have read some things about package.json (here or in the comment section of this). But I have no clue where this package.json comes from/where to find it. My initial feeling is that it has something to do with javascript code, but my repository is c++.
Could someone in more detail explain where to find this package.json (if also applicable for c++) or maybe tell about new features of git/ new ways to get the automatic behaviour?
(More detail about the use case: I want to add a (small) sqllite database to the repository and I have read that it's kind of bad to commit binary files to git. So I learned one way (comments) is to do a pre commit(?) hook that dumps the file into sql and then a post-checkout(?) hook that converts the sql back to binary sqllite database)