Skip to main content

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.

GitHub Repository

Features

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

Installation

  1. Install git-fleet-manager using pip:

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

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

  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 .gfm file:

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

    gfm log /projects --max-commits 5
    
  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

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

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

git_fleet_manager-0.1.1.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.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for git_fleet_manager-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ceaa0e10d6c44b7cbf7972f8ba1a58ed9c05a8c5cc4e1544e7559d7212865b07
MD5 5659d81419a2dedddaea2b6b4b47fe73
BLAKE2b-256 ca647e666b10e51948353344154dfb936155bc77e02916723f7e1f588c1f686e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_fleet_manager-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99b700b8391e1a0bedd0268ac236d65f9cf686b96ec42ee160c1748e4abbc189
MD5 f2d89faa0785ab62feb5d269fcc3cbb8
BLAKE2b-256 974d5b9f58ea1dbf2b16b81ad8de2a2223925d69627050d17ead9cb997673634

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