#!/bin/bash # Name of the GitHub user whose forks you want to update user=your-github-username # Get a list of all repository names for the user repos=$(curl -s https://api.github.com/users/$user/repos?per_page=1000 | jq -r '.[].name') # Loop through the repository names and update each fork for repo in $repos; do echo Updating $repo... cd $repo git checkout master git fetch upstream git rebase upstream/master git push -f origin master cd .. done