I'm trying to write a shell script that should fail out if the current git branch doesn't match a pre-defined value.
if $gitBranch != 'my-branch'; then
echo 'fail'
exit 1
fi
Unfortunately, my shell scripting skills are not up to scratch: How do I get the current git branch in my variable?