Executing git-hooks on windows errors out
问题 So, I have written a simple git-hooks for pre-push which works just fine on Linux or Mac, but doesn't work on Windows. Script: Tries to match the commit message with a regular expression, and should return 0 if matches or else exit. Based on the articles I read, they say that the hook should just work. Command: if [[ "$message" =~ "$regular_expression" ]]; Error: .git/hooks/pre-push: line 6: conditional binary operator expected .git/hooks/pre-push: line 6: syntax error near `=~' .git/hooks