Skip to content

Latest commit

 

History

History
118 lines (78 loc) · 3.2 KB

README.md

File metadata and controls

118 lines (78 loc) · 3.2 KB

gitcmmt

gitcmmt is a lightweight and user-friendly CLI tool designed to simplify and streamline your Git workflow. It automates common Git tasks like staging, committing, and pushing changes, while allowing flexibility through configurable options.


Features

  • Automate Git Commands:
    • Automatically run git add . to stage changes.
    • Commit changes with customizable messages.
    • Push to the desired remote and branch.
  • Customizable Flags:
    • Skip specific steps (--skip-add, --skip-push).
    • Customize the branch (--branch) and remote (--remote).
    • Specify commit messages manually (--msg) or use quick templates (--dbg for "Bugs fixed").
  • Interactive Push Confirmation:
    • Ask for confirmation before pushing changes.
  • Auto-Push Option:
    • Automatically push changes with the --auto-push flag.

Installation

Install the package globally via npm:

npm install -g gitcmmt

Or run directly using npx:

npx gitcmmt

Usage

Basic Usage

Run the tool to stage, commit, and optionally push changes:

npx gitcmmt

Available Options

Option Description Default
--skip-add Skip the git add . step. false
--skip-push Skip the git push step. false
--branch Specify the branch to push changes to. main
--remote Specify the remote repository. origin
--msg Manually set a commit message. Auto-generated
--dbg Use a quick commit message: "Bugs fixed". false
--auto-push Automatically push changes without asking for confirmation. false

Examples

1. Default

Run the tool without --auto-push to get a prompt asking whether to push changes:

npx gitcmmt

2. Commit and Push to main

npx gitcmmt --msg "Updated README" --auto-push

3. Skip Push Step

npx gitcmmt --skip-push

4. Customize Remote and Branch

npx gitcmmt --remote upstream --branch develop

5. Use Quick Commit Message

npx gitcmmt --dbg

How It Works

  1. Stage Changes: Automatically stages all changes unless --skip-add is used.
  2. Commit Changes: Commits with a message provided by --msg, --dbg, or an auto-generated summary of changes.
  3. Push Changes: Pushes changes to the remote and branch specified, with an optional confirmation step unless --auto-push is enabled.

Contributing

We welcome contributions! If you have ideas for improvement or find bugs, feel free to open an issue or submit a pull request.


Support

If you encounter issues, please open an issue on GitHub.

Happy coding! 🚀