From: sgf Date: Tue, 21 Jun 2022 21:24:50 +0000 (+0300) Subject: Add sync git hook. X-Git-Url: https://gitweb.sgf-dma.tk/?a=commitdiff_plain;h=d0be4874ad6ed805516f5bfa5111a5fa6fc81be6;p=go.git Add sync git hook. --- diff --git a/git_hooks/post-commit b/git_hooks/post-commit new file mode 100755 index 0000000..f5002cd --- /dev/null +++ b/git_hooks/post-commit @@ -0,0 +1,11 @@ +#!/bin/sh + +set -euf + +remotes="$(git remote)" +if echo "$remotes" | grep -q 'sync'; then + git push --all sync + git push --tags sync +else + echo ">>>>> No sync remote defined." 1>&2 +fi