#!/bin/bash if ! git diff-index --quiet --cached HEAD -- ; then echo "Cannot release dirty git tree. Commit your changes to main first." exit 1 fi git push "$@" git checkout release git reset --hard main git push -f git checkout main