diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-07-27 18:23:58 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2021-08-14 11:59:41 +0200 |
commit | 309c63c11939e7aca3869f5351e453b316791984 (patch) | |
tree | 0e9bd5510be2fcda8ba60a6c55453879a70409b5 /.local | |
parent | 350b3de0dd28c3192d538c814eb6ec8f148351ff (diff) |
Add simple shellscript to push to all git remotes
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/git-push-all | 12 |
1 files changed, 12 insertions, 0 deletions
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 |