My usual git workflow for deploying is the following:
[while on master branch]
git pull
git push
git checkout production
git pull
git merge master
git push
Would it be possible to create a function for executing all these commands, but if one of them returns an error (i.e. merge conflict), it stops right there?