Crates.io | multigit |
lib.rs | multigit |
version | 0.1.2 |
source | src |
created_at | 2024-09-17 18:20:58.878619 |
updated_at | 2024-09-19 04:36:36.808383 |
description | A CLI tool to manage multiple Git repositories simultaneously |
homepage | https://github.com/schwa/multigit-rs |
repository | https://github.com/schwa/multigit-rs |
max_upload_size | |
id | 1377827 |
size | 89,429 |
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.
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:
cargo install --git https://github.com/schwa/multigit-rs
This command will download the source code, compile it, and install the multigit
binary 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:
git clone https://github.com/schwa/multigit-rs.git
cd multigit-rs
Build and install from the local source:
cargo install --path .
After installation, you can run multigit --version
to verify that it's installed correctly.
To start using Multigit, you first need to register your Git repositories:
multigit register <PATH>
The <PATH>
can be:
If you provide a directory path, Multigit will recursively search for all Git repositories within that directory and register them.
Example:
multigit register ~/projects/repo1 ~/projects/repo2 ~/all-projects
To remove repositories from Multigit's management:
multigit unregister <PATH>
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:
multigit unregister --all
To confirm whether repositories are registered or to see all managed repositories:
multigit list
This command is useful to verify if a repository was successfully registered or unregistered.
Multigit provides the following commands for managing your repositories:
multigit [COMMAND] [OPTIONS]
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 repositoriesMost commands support the following option:
--filter <FILTER>
: Apply filters to select specific repositoriesCheck status of all repositories:
multigit status
Check status of dirty repositories:
multigit status --filter dirty
Commit changes in dirty repositories:
multigit commit --filter dirty -m "Update documentation"
Pull changes in dirty repositories:
multigit pull --filter dirty
Execute a custom command in dirty repositories:
multigit exec --filter dirty -- git log --oneline -n 5
Multigit can be configured by editing the TOML file located at ~/.config/multigit/config.toml
.
[Add more details about configuration options and their effects]
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Jonathan Wight
0.1
For more detailed information on each command and its options, use the --help
flag:
multigit --help
multigit [COMMAND] --help