From 309c63c11939e7aca3869f5351e453b316791984 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 27 Jul 2020 18:23:58 +0200 Subject: Add simple shellscript to push to all git remotes --- .local/bin/git-push-all | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .local/bin/git-push-all (limited to '.local') diff --git a/.local/bin/git-push-all b/.local/bin/git-push-all new file mode 100755 index 0000000..d12a53a --- /dev/null +++ b/.local/bin/git-push-all @@ -0,0 +1,12 @@ +#!/bin/sh + +branch="${1:-master}" + +[ $# -gt 0 ] && shift + +printf "Pushing %s branch to all remotes...\n" "$branch" + +for remote in $(git remote) +do + git push "$remote" "$branch" "$@" +done -- cgit v1.1