Inside recipes you have to escape dollar signs in order to get them interpreted by the shell. Otherwise, Make treats $(git ...)
as a built-in command or a variable and tries to evaluate it (of course, unsuccessfully).
check_branch: if [ "$$(git rev-parse --abbrev-ref HEAD)" == "master" ]; then \ ...