Git post-commit hook as a background task
问题 I have a script, that I need to run after committing to a project under git revision control. Therefore I created a post-commit hook in my projects .git directory in the subdirectory /hooks, named it 'post-commit' and gave it the following contents: #!/bin/sh # I am a post-commit hook /usr/local/bin/my_script & my_script is executable and runs fine in /bin/sh. In fact it has a runtime of several seconds, so I want it to be backgrounded and detached from the current shell. That's why I put the