Scripts: add git push all
This commit is contained in:
parent
210054fe8b
commit
5c0cba776b
1 changed files with 11 additions and 0 deletions
11
bin/gitpushall.sh
Executable file
11
bin/gitpushall.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Pushes this branch to all remotes
|
||||||
|
if ! git branch >/dev/null; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
declare -r branch="$(git branch | grep '*' | cut -c 3-)"
|
||||||
|
|
||||||
|
git remote -v |
|
||||||
|
grep '\(push\)' |
|
||||||
|
awk -F' ' -vbranch="$branch" '{ system("(git push " $1 " " branch ") &") }'
|
Loading…
Reference in a new issue