Triple-Z/LeetCode

A better way to install hooks

Opened this issue · 2 comments

Here is the situation: other Git hooks have been installed before, and we need to install this repo's hooks. It's better to be a appending way.

Like this:

$(cat hooks/$hook) >> .git/hooks/$hook

Mind the install procedure runs multiple times.

$ grep -ZP "$(sed -z 's/\n/\\n/g' test1)" test