Skip to main content

A command line tool for managing several git repositories at once

Project description

GitFleetManager

GitFleetManager 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.

GitHub Repository

Features

  • Recursive Repository Discovery: Automatically finds all Git repositories in a directory and its subdirectories.
  • Selective Repository Management: Use a .gitr 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.

Installation

  1. Install GitFleetManager using pip:

    pip install git-fleet-manager
    
  2. Verify the installation:

    gfm --version
    
  3. GitFleetManager 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 GitFleetManager.

gfm --version

.gitr File

If a .gitr 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 .gitr file.

Example .gitr file:

repo1
subdir/repo2

Examples

  1. Check the status of all repositories in the current directory:

    gfm status
    
  2. Pull changes for all repositories in /projects:

    gfm pull /projects
    
  3. Push changes for repositories listed in a .gitr file:

    gfm push /projects
    
  4. View the last 5 commits for all repositories:

    gfm log /projects --max-commits 5
    
  5. Display the version of GitFleetManager:

    gfm --version
    

Project Structure

git_fleet_manager/
├── git_utils.py       # Utility functions for Git operations
├── cli.py             # Command-line interface for GitFleetManager
└── __init__.py        # Package initialization and versioning

Source Code

The source code is available on GitHub at https://github.com/diefenbach/GitFleetManager.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve GitFleetManager.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

GitFleetManager 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

git_fleet_manager-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_fleet_manager-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file git_fleet_manager-0.1.0.tar.gz.

File metadata

  • Download URL: git_fleet_manager-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for git_fleet_manager-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ac2ade964b1cae4e83fe1787e035660b64fe63c8a0dc25ab36e62a495972861
MD5 d1a89a9b353804ec2f29eca6022e7c53
BLAKE2b-256 cd79ac4bfea27ad29fa70ebc1333c6a28a0e2240a1ef6752974d066d83c17df6

See more details on using hashes here.

File details

Details for the file git_fleet_manager-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_fleet_manager-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58860c9f73f340b3eb59e861dc295e972fa065e0b2cdea9fdf6d07cba0923c62
MD5 8aca0831f50d42c837f3cc91e7487877
BLAKE2b-256 6dfd16d65c6d7d51717e902db7065c627634257003ad255311d226c8f367e885

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page