Multi Git project updater for macOS. Double-click to fetch and pull several local repositories, then return to the command prompt.
multigit.command runs git fetch --all --prune and git pull --ff-only for every path in repos.txt. A repository that is already current prints Already up to date. When the last one finishes, Terminal stays open at a % prompt.
It is meant for the same set of work repositories on more than one computer, for example a machine at home and a machine at the office. Keep repos.txt filled in on each Mac, then update every repository with one double-click. You can also run that same file from Terminal:
./multigit.commandClone the repository, then allow the file to run once:
chmod +x /path/to/multigit/multigit.commandIf macOS says it cannot verify the file, clear the quarantine flag and open it again:
xattr -d com.apple.quarantine /path/to/multigit/multigit.commandBoth commands are needed only once. After that, double-click multigit.command.
If the block dialog appears again, click Done, open System Settings → Privacy & Security, and choose Open Anyway.
Open repos.txt before the first run. The file ships with placeholders, and those folders do not exist on your Mac. Replace each line with the full path to one of your local Git repositories. Put one path on each line:
/Users/yourusername/projects/yourproject1
/Users/yourusername/projects/yourproject2
/Users/yourusername/projects/yourproject3
/Users/yourusername/projects/yourproject4
yourusername is the short name of your macOS account. yourproject1 is the folder name of a repository. A filled-in line looks like this:
/Users/alex/projects/notes
To add another project, add its path on a new line. Lines that start with # are comments and are skipped. multigit.command and repos.txt must stay in the same folder.