gitcmmt
v1.0.2
Published
`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
Maintainers
Readme
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.
- Automatically run
- 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 (--dbgfor "Bugs fixed").
- Skip specific steps (
- Interactive Push Confirmation:
- Ask for confirmation before pushing changes.
- Auto-Push Option:
- Automatically push changes with the
--auto-pushflag.
- Automatically push changes with the
Installation
Install the package globally via npm:
npm install -g gitcmmtOr run directly using npx:
npx gitcmmtUsage
Basic Usage
Run the tool to stage, commit, and optionally push changes:
npx gitcmmtAvailable 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 gitcmmt2. Commit and Push to main
npx gitcmmt --msg "Updated README" --auto-push3. Skip Push Step
npx gitcmmt --skip-push4. Customize Remote and Branch
npx gitcmmt --remote upstream --branch develop5. Use Quick Commit Message
npx gitcmmt --dbgHow It Works
- Stage Changes: Automatically stages all changes unless
--skip-addis used. - Commit Changes: Commits with a message provided by
--msg,--dbg, or an auto-generated summary of changes. - Push Changes: Pushes changes to the remote and branch specified, with an optional confirmation step unless
--auto-pushis 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! 🚀
