Modified the pre-commit.sample file in git hooks and how to upload it to github?

I mean, I changed the contents of pre-commit.sample and changed the file name to pre-commit, but after git push and then git clone, I found that the files in .git / hooks/ are still in sample format.

do you need to configure pre-receive.sample??

Mar.18,2021

It is not a bug, it is a feature

.git / hooks/ is specifically designed for users to use locally for a simple reason:

  1. for creators, it is likely that ssh deployment keys and the like are put in, and it is dangerous to share them;
  2. to the recipient, I'm just git push . Why am I suddenly deleted? It is also dangerous to accept arbitrary code insertion into the git standard process.

so, if you want to share hooks, you need to explicitly put it in repo, just use symbolic links. Then configure an installation script (bashscript, makefile, package.json, etc), for the user to install explicitly.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39b50-2c1d0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39b50-2c1d0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?