Skip to content

Instantly share code, notes, and snippets.

@bendikro
Created December 1, 2014 14:06
Show Gist options
  • Save bendikro/1e1975a0b84a497d758d to your computer and use it in GitHub Desktop.
Save bendikro/1e1975a0b84a497d758d to your computer and use it in GitHub Desktop.
Update remote git repos
#!/usr/local/bin/bash
GIT=/usr/local/bin/git
REPO_DIR=/home/bro/programmer/deluge/deluge_cron_update
BRANCHES=(develop 1.3-stable)
UPDATE_REPOS=(github deluge-github)
cd $REPO_DIR
$GIT remote update
for branch in ${BRANCHES[*]}
do
$GIT checkout $branch && $GIT merge remotes/deluge/$branch
for repo in ${UPDATE_REPOS[*]}
do
$GIT push $repo $branch
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment