Git pre-commit hook not running on windows

前端 未结 9 871
盖世英雄少女心
盖世英雄少女心 2021-01-31 08:15

I\'m just starting to look into Git hooks, but I can\'t seem to get them to run.

I set up a local repository, so there is now a \'.git\' directory in my project folder.

9条回答
  •  后悔当初
    2021-01-31 08:44

    You probably don't have the permissions to run the pre-commit file

    Run in your terminal:

    chmod +x .git/hooks/pre-commit
    

    Thanks to @vaughan for giving the idea

提交回复
热议问题