Git post-commit hook as a background task

前端 未结 4 1888
情书的邮戳
情书的邮戳 2020-12-20 11:11

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 sub

4条回答
  •  遥遥无期
    2020-12-20 11:52

    Here's how it works for me:

    #!/bin/sh
    # I am a post-commit hook
    nohup /usr/local/bin/my_script &>/dev/null &
    

提交回复
热议问题