Created
June 17, 2026 05:59
-
-
Save awadhwana/81c11301bba16c9ff31cf6ba9e9986c8 to your computer and use it in GitHub Desktop.
Keep a fleet of git repos up to date overnight: fast-forward base branches, stash-safe, locked, with macOS notifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
| "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <!-- | |
| ┌─────────────────────────────────────────────────────────────────────┐ | |
| │ BEFORE YOU USE THIS: replace every "/Users/me" below with your own │ | |
| │ home path (run `echo $HOME` to find it), and point REPOS_DIR at the │ | |
| │ folder that CONTAINS your repos (its immediate subdirs = the repos). │ | |
| │ Each spot you must edit is flagged with the word EDIT in a comment. │ | |
| └─────────────────────────────────────────────────────────────────────┘ | |
| --> | |
| <plist version="1.0"> | |
| <dict> | |
| <!-- EDIT (optional): unique reverse-DNS id, e.g. com.yourname.update-all-repos --> | |
| <key>Label</key> | |
| <string>com.me.update-all-repos</string> | |
| <!-- EDIT: absolute path to where you saved update-all-repos.sh --> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/Users/me/code/update-all-repos.sh</string> | |
| </array> | |
| <!-- cron/launchd have a thin env; give launchd a real PATH so it finds git/curl/osascript --> | |
| <key>EnvironmentVariables</key> | |
| <dict> | |
| <!-- EDIT: the folder whose subdirectories are your git repos --> | |
| <key>REPOS_DIR</key> | |
| <string>/Users/me/code</string> | |
| <!-- EDIT if Intel Mac: drop /opt/homebrew/bin (that path is Apple Silicon only) --> | |
| <key>PATH</key> | |
| <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string> | |
| </dict> | |
| <!-- EDIT (optional): when to run. Daily at 08:00. If the Mac was asleep, launchd runs it on wake. --> | |
| <key>StartCalendarInterval</key> | |
| <dict> | |
| <key>Hour</key><integer>8</integer> | |
| <key>Minute</key><integer>0</integer> | |
| </dict> | |
| <!-- EDIT: replace /Users/me with your home path. Folder must exist (script's LOG_DIR creates ~/.cache/update-all-repos). --> | |
| <key>StandardOutPath</key> | |
| <string>/Users/me/.cache/update-all-repos/launchd.out.log</string> | |
| <key>StandardErrorPath</key> | |
| <string>/Users/me/.cache/update-all-repos/launchd.err.log</string> | |
| </dict> | |
| </plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment