Skip to content

Instantly share code, notes, and snippets.

@mitsuhisaT
Created June 15, 2020 22:46
Show Gist options
  • Save mitsuhisaT/86673fb555edb4a4129065f4a83722ac to your computer and use it in GitHub Desktop.
Save mitsuhisaT/86673fb555edb4a4129065f4a83722ac to your computer and use it in GitHub Desktop.
Syncing multiple upstream bash scripts.
Aerial master
Pi_Servo_Hat master
RPi_Cam_Web_Interface master
RPi_PanTilt_Camera_Kit master
tensorflow/docs-l10n master
covid19 development
covid19-saitama development
aiyprojects-raspbian aiyprojects
#!/usr/bin/env bash
sync_upstream()
{
cd $1
pwd
# echo $2
git fetch upstream
git merge upstream/$2
git push
cd -
}
while read repo default
do
sync_upstream $repo $default
done < githubrepos.txt
@mitsuhisaT
Copy link
Author

These are to sync upstream repositories script.
Please edit 'githubrepos.txt' for your repositories.
The first is repository's name, the second is default branch name.
You may separate a space.
Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment