From: sgf Date: Wed, 12 Apr 2023 14:55:10 +0000 (+0300) Subject: Add git hooks for sync remote X-Git-Url: https://gitweb.sgf-dma.tk/?a=commitdiff_plain;h=8e99f17c96b1f49a6daffafc98a99688536a002b;p=le_isp_update.git Add git hooks for sync remote --- diff --git a/git_hooks/post-commit b/git_hooks/post-commit new file mode 100755 index 0000000..5454b5c --- /dev/null +++ b/git_hooks/post-commit @@ -0,0 +1,10 @@ +#!/bin/sh + +set -euf + +remotes="$(git remote)" +if echo "$remotes" | grep -q 'sync'; then + git push --all sync +else + echo ">>>>> No sync remote defined." 1>&2 +fi