We’re using a git post-receive hook to auto-minify our JS and sync our local and remote dev databases.
This is generally desirable, but occasionally not.
Is there anyway to pass an argument to the post-receive hook from git push so this can be disabled when required?
Thanks!
If you keep the
post-receivehook, you could decide to run the script based on the ref name of each file.So you could check the branch name from the
ref-name, and for some branches, decide not to run your script.