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
If you change #!/bin/sh to #!/bin/bash (assuming you're ok with using bash), and use nohup, your example should work.
#!/bin/sh
#!/bin/bash
nohup