Skip to content

Instantly share code, notes, and snippets.

@foxyseta
Last active August 14, 2022 00:31
Show Gist options
  • Save foxyseta/77540e3e33a43f68e84bbdb15f6d7077 to your computer and use it in GitHub Desktop.
Save foxyseta/77540e3e33a43f68e84bbdb15f6d7077 to your computer and use it in GitHub Desktop.
Apply the same diff file to every repo in the current folder.
#!/bin/sh -ex
for folder in $(ls); do
if [ -d "$folder" ]; then
cd $folder
patch -p1 < ../patch.diff
git add .
git pull
git commit -m "Apply patch from template"
git push
cd ..
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment