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.
- Recursive Repository Discovery: Automatically finds all Git repositories in a directory and its subdirectories.
- Selective Repository Management: Use a
.gfm
file 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.
You can install git-fleet-manager as a tool using uv (recommended):
uv tool install git-fleet-manager
Alternatively, you can install git-fleet-manager using pip:
pip install git-fleet-manager
pip install git+https://github.com/diefenbach/git-fleet-manager.git
Verify the installation:
bash gfm --version
git-fleet-manager is now ready to use. Run the gfm
command from anywhere in your terminal.
Run the gfm
command with the desired subcommand and options.
Check the status of all repositories in the specified directory.
gfm status [directory]
- directory: The directory to scan for repositories (default: current directory).
Pull changes for all repositories in the specified directory.
gfm pull [directory]
- directory: The directory to scan for repositories (default: current directory).
Push changes for all repositories in the specified directory.
gfm push [directory]
- directory: The directory to scan for repositories (default: current directory).
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).
Display the current version of git-fleet-manager.
gfm --version
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
-
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
.gfm
file: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
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
The source code is available on GitHub at https://github.com/diefenbach/git-fleet-manager.
Contributions are welcome! Feel free to open issues or submit pull requests to improve git-fleet-manager.
This project is licensed under the MIT License. See the LICENSE
file for details.
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.