multi-git is a Bash script that helps you run Git commands across multiple Git repositories within a directory tree. It automatically finds all Git repositories under the current directory and executes the specified Git command in each one.
- Discover all Git repositories under the current directory.
- Run any Git command in all found repositories.
- Highlight repositories with uncommitted changes.
- Reports failures for any repository where the command did not succeed.
multi-git <git-args...>- Replace
<git-args...>with any Git command and its arguments (e.g., status, pull, fetch, etc.). - Special command:
multi-git ls-statusLists all repositories with uncommitted changes and their current branch.
Example:
multi-git status
multi-git pull
multi-git ls-status- Copy the script to /usr/bin:
sudo cp multi-git /usr/bin/multi-git- Make it executable:
sudo chmod +x /usr/bin/multi-gitNow you can run multi-git from anywhere.
This project is licensed under the GNU General Public License v2.0 only. See the LICENSE file for details.