From 69d11d099ddead6e2ef00646ae02cada9f6ab197 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 25 Feb 2019 09:26:01 -0300 Subject: [PATCH] Adding sync script. --- gitsync.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+), 0 deletions(-) create mode 100755 gitsync.sh diff --git a/gitsync.sh b/gitsync.sh new file mode 100755 index 0000000..e4e84eb --- /dev/null +++ b/gitsync.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# https://help.github.com/articles/syncing-a-fork/ +# +# https://help.github.com/articles/configuring-a-remote-for-a-fork/ +# +# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html +# +# Setup: +# +# git remote add github https://github.com/PerryWerneck/pw3270-plugin-hllapi.git +# +# + +git push + +git fetch origin +git checkout master +git merge origin/master + +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') +do + echo "Updating ${repo} ..." + git push ${repo} +done + -- libgit2 0.21.2