Multigit
Multigit is a powerful command-line interface (CLI) tool designed to manage multiple Git repositories simultaneously. It streamlines common Git operations across multiple projects, saving time and effort for developers working with multiple repositories.
Note: This project is currently in progress and may not work properly. Use at your own risk.
Features
- Perform Git operations (status, add, commit, push, pull) on multiple repositories at once
- Execute custom commands across selected repositories
- List and manage registered repositories
- Filter repositories for specific operations
- Open the configured Git UI program for selected repositories
- Easy registration and unregistration of repositories
Installation
Multigit is a Rust project that can be installed using Cargo, the Rust package manager. Follow these steps to install Multigit:
-
If you don't have Rust and Cargo installed, first install them by following the instructions at https://www.rust-lang.org/tools/install.
-
Once Rust and Cargo are installed, you can install Multigit directly from the GitHub repository:
This command will download the source code, compile it, and install the
multigitbinary in your Cargo bin directory (usually~/.cargo/bin/). -
Ensure that your Cargo bin directory is in your system's PATH.
Alternatively, if you want to contribute or modify the code:
-
Clone the repository:
-
Build and install from the local source:
After installation, you can run multigit --version to verify that it's installed correctly.
Repository Management
Registering Repositories
To start using Multigit, you first need to register your Git repositories:
The <PATH> can be:
- A direct path to a Git repository
- A path to a directory containing one or more Git repositories
If you provide a directory path, Multigit will recursively search for all Git repositories within that directory and register them.
Example:
Unregistering Repositories
To remove repositories from Multigit's management:
Similar to the register command, <PATH> can be a direct path to a Git repository or a directory. If a directory is provided, all registered repositories within that directory will be unregistered.
To unregister all repositories at once:
Listing Repositories
To confirm whether repositories are registered or to see all managed repositories:
This command is useful to verify if a repository was successfully registered or unregistered.
Common Git Operations
Multigit provides the following commands for managing your repositories:
Commands:
status: Show the status of repositoriesadd: Add files to the staging area in selected repositoriescommit: Commit changes in selected repositoriespush: Push changes to remote repositoriespull: Pull changes from remote repositoriesexec: Execute a custom command in selected repositoriesui: Open the configured Git UI program for selected repositories
Options:
Most commands support the following option:
--filter <FILTER>: Apply filters to select specific repositories
Examples:
-
Check status of all repositories:
-
Check status of dirty repositories:
-
Commit changes in dirty repositories:
-
Pull changes in dirty repositories:
-
Execute a custom command in dirty repositories:
Configuration
Multigit can be configured by editing the TOML file located at ~/.config/multigit/config.toml.
[Add more details about configuration options and their effects]
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
Author
Jonathan Wight
Version
0.1
For more detailed information on each command and its options, use the --help flag: