A command line tool for managing several git repositories at once
Project description
git-fleet-manager
git-fleet-manager is a command-line tool for managing multiple Git repositories at once. It allows you to perform common Git operations such as checking the status, pulling, pushing, and viewing commit logs across multiple repositories in a specified directory.
Features
- Recursive Repository Discovery: Automatically finds all Git repositories in a directory and its subdirectories.
- Selective Repository Management: Use a
.gfmfile to specify which repositories to manage. - Batch Operations:
- Check the status of all repositories.
- Pull changes from remote repositories.
- Push changes to remote repositories.
- View commit logs for all repositories.
Installation
You can install git-fleet-manager using pip:
From PyPI
pip install git-fleet-manager
From GitHub (latest development version)
pip install git+https://github.com/diefenbach/git-fleet-manager.git
Alternatively, you can install git-fleet-manager as a tool using uv (recommended):
uv tool install git-fleet-manager
Verify the installation:
bash gfm --version
git-fleet-manager is now ready to use. Run the gfm command from anywhere in your terminal.
Usage
Run the gfm command with the desired subcommand and options.
Commands
status
Check the status of all repositories in the specified directory.
gfm status [directory]
- directory: The directory to scan for repositories (default: current directory).
pull
Pull changes for all repositories in the specified directory.
gfm pull [directory]
- directory: The directory to scan for repositories (default: current directory).
push
Push changes for all repositories in the specified directory.
gfm push [directory]
- directory: The directory to scan for repositories (default: current directory).
log
View the commit log for all repositories in the specified directory.
gfm log [directory] [--max-commits MAX_COMMITS]
- directory: The directory to scan for repositories (default: current directory).
- --max-commits: The maximum number of commits to display for each repository (default: 10).
--version
Display the current version of git-fleet-manager.
gfm --version
.gfm File
If a .gfm file exists in the specified directory, only the repositories listed in the file will be managed. The file should contain one repository path per line, relative to the directory containing the .gfm file.
Example .gfm file:
repo1
subdir/repo2
Examples
-
Check the status of all repositories in the current directory:
gfm status -
Pull changes for all repositories in
/projects:gfm pull /projects
-
Push changes for repositories listed in a
.gfmfile:gfm push /projects
-
View the last 5 commits for all repositories:
gfm log /projects --max-commits 5
-
Display the version of git-fleet-manager:
gfm --version
Project Structure
git_fleet_manager/
├── git_utils.py # Utility functions for Git operations
├── cli.py # Command-line interface for git-fleet-manager
└── __init__.py # Package initialization and versioning
.github/
└── workflows/ # GitHub Actions workflow files
├── test.yml # CI workflow for testing
└── publish.yml # CD workflow for PyPI publishing
Source Code
The source code is available on GitHub at https://github.com/diefenbach/git-fleet-manager.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve git-fleet-manager.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
This project was created with the assistance of AI tools, including code generation and documentation support.
git-fleet-manager was developed to simplify the management of multiple Git repositories, making it easier to perform batch operations efficiently.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_fleet_manager-1.0.2.tar.gz.
File metadata
- Download URL: git_fleet_manager-1.0.2.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1c7af677342c67c047694265605421e1af2507fbf838fcbda443f4a5d0c9bf5
|
|
| MD5 |
9b3ed169c46516a669029edbb2099c60
|
|
| BLAKE2b-256 |
b1534aa675760cde87e6d5be0129e966a094933a96dcb7061e775e0b46855208
|
File details
Details for the file git_fleet_manager-1.0.2-py3-none-any.whl.
File metadata
- Download URL: git_fleet_manager-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
598e75110dcf867565ca2143f4537574f792bd3d439c10a98ed3db79d6c40f8b
|
|
| MD5 |
fc27a0c0434bb72d55e78ff395cec976
|
|
| BLAKE2b-256 |
8a9b9ec5253dd1ccb06b43aa3fcacf03e84e6f0ecbb17fb8799abfec4e8122a4
|