DRTorresRuiz / cpptemplate

Basic C++ project template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template Programming Language - C++

CodeFactor

Get git hooks working

By default, Git saves hooks in folder .git/hooks. You can always place our hooks in the .git/hooks folder to work with them. However, this folder is not tracked by Git itself since it is placed within the .git folder.

We want Git to track our hooks and include them in our template. To do so, we have to set a new core.hooksPath for the git command:

  git config core.hooksPath .hooks/

We can also set this configuration globally including the --global option, and change the path of the hooks, which in our example above is .hooks/.

Troubleshooting

  • Hook was ignored because it's not set as executable. If git ignores your hooks, give them additional permissions:

    chmod -R u+x .hooks/

Daniel R. Torres Ruiz © 2023

About

Basic C++ project template


Languages

Language:CMake 49.9%Language:C++ 26.1%Language:Shell 24.0%