Skip to main content

A CLI tool to simplify Git workflows

Project description

pygitmate

PyPI version
A lightweight, experimental CLI tool to simplify Git workflows, crafted out of necessity for developers(especially me ;).


🚀 Features

pygitmate is a developer-focused Git CLI tool designed to streamline common Git operations while maintaining flexibility.

  • Branch Management

    • Create branches for features, hotfixes, enhancements, and more.
    • Automatically fetch and switch to the base branch before creating a new one.
  • Commit with Standards

    • Helps you write commits that follow standardized conventions.
  • Merging Simplified

    • Merge your current branch into another effortlessly, with options to stash changes dynamically.
  • Interactive Workflows

    • Fully interactive CLI with dynamic prompts for missing information.

⚠️ Experimental Status

This (new) tool is in its experimental phase and was built out of the need for a personal Git helper. Use at your own discretion, and report issues or suggest features if you find it helpful.


📥 Installation

You can install pygitmate via pip:

pip install pygitmate

Can be used via cli with alias gmate as well (gmate new-branch):


🛠️ Usage

General Usage

pygitmate [COMMAND]

Available Commands

1. Create a New Branch

pygitmate new-branch

Interactive flow for creating a branch:

  • Select the branch type: Feature, Hotfix, Enhancement, etc.
  • Specify a branch name.
  • Automatically fetches the latest base branch (default: master) before creating the new branch.

2. Commit Changes

pygitmate commit

Helps you create standardized commit messages:

  • Select the commit type: feat, fix, docs, etc.
  • Provide a concise summary for the commit.

3. Merge Branches

pygitmate merge [TARGET_BRANCH]

Merge the current branch into a target branch:

  • Automatically checks for uncommitted changes and stashes them if required.
  • Provides a list of recent branches to choose from if no target branch is specified (default: master).

💡 Examples

Creating a New Branch

pygitmate new-branch

Example Interaction:

Select the branch type:
1. Feature
2. Hotfix
3. Enhancement
4. Bugfix
Enter Branch Type number [1/2/3/4]: 1
Enter branch name (without spaces): feature_x

Committing Changes

pygitmate commit

Example Interaction:

Select the type of commit:
1. feat: A new feature
2. fix: A bug fix
3. docs: Documentation changes
Enter Commit Type number [1/2/3]: 1
Enter a concise summary of your changes: Added login functionality

Merging Branches

pygitmate merge

Example Interaction:

Recent branches:
1. feature/login
2. bugfix/ui-fix
3. enhancement/readme-update
...
10. hotfix/payment-bug
11. master (default)

Select the target branch by number or enter branch name [11]: 1
Warning: Uncommitted changes detected in the working directory.
Do you want to stash the changes? (yes/no) [yes]: yes
Stashing uncommitted changes...
Switching to target branch 'feature/login'...
Merging branch 'main' into 'feature/login'...
Successfully merged 'main' into 'feature/login'.

🧰 Dependencies

  • Click: Command-line interface library.
  • GitPython: Python library for interacting with Git repositories.
  • Rich: Beautiful CLI formatting and styling.

🤝 Contributions

Since pygitmate is experimental, contributions, feature suggestions, and issue reports are highly welcome. Fork this repository and submit a pull request to improve the tool.


🏗️ Built With

  • Python 3.11+
  • Some Love

📜 License

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


⚡ Acknowledgments

pygitmate was created out of a need for simplifying repetitive Git tasks and improving efficiency in workflows. Inspired by the challenges faced during development, this tool is a handy companion for developers who work extensively with Git.

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

pygitmate-0.1.0.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

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

pygitmate-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygitmate-0.1.0.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for pygitmate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5890117fdccb28408d4594dc584978a4a2d1cdd4812fdd6f47030f9d735e3f6
MD5 ce8c443d93b9bdd59449a45385041a77
BLAKE2b-256 78c075d7c22553296125b4f037d1ff7828789137a211ef7a857590ef8f4d46a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pygitmate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for pygitmate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f9e5481145d3e1ed57785a757ede7d5a395fbe801f3b5c5e846b93428047946
MD5 48c26bc94f0181ee07cd5c932f5ddb93
BLAKE2b-256 c4576a5dfc8e83235c8ee6ebd78dc65e87802d4134960093b15d3187efa87260

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