#! /bin/bash while read old new ref ; do BRANCH="${ref#refs/heads/}" if [ "${new}" = "0000000000000000000000000000000000000000" ]; then git push --force vm-staticweb ":${BRANCH}" else git push --force vm-staticweb "${BRANCH}" fi done