From: sgf Date: Tue, 7 Dec 2021 15:22:47 +0000 (+0300) Subject: Add sync git hooks. X-Git-Url: https://gitweb.sgf-dma.tk/?a=commitdiff_plain;h=ebb15ef25584adaac7ad64043b0cedfece684423;p=aoc-2021.git Add sync git hooks. --- diff --git a/day1a/git_hooks/post-commit b/day1a/git_hooks/post-commit new file mode 100755 index 0000000..f5002cd --- /dev/null +++ b/day1a/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