@saroarshahan/gitgc
v1.0.9
Published
A lightweight CLI tool that automates `git add`, `git commit`, and `git push` — with optional flags for flexibility.
Maintainers
Readme
🚀 @saroarshahan/gitgc
A lightweight CLI tool that automates git add, git commit, and git push — with optional flags for flexibility.
📦 Installation
npm install -g @saroarshahan/gitgcyarn global add @saroarshahan/gitgcnpm install @saroarshahan/gitgcyarn add @saroarshahan/gitgc🛠️ Usage
npm gitgc "your commit message" [--options]🔧 Options
| Flag | Description | Default |
| ------------------- | -------------------------------------------------------- | -------- |
| -f, --files | Specify files or folders to stage | . |
| -r, --remote | Git remote to push to | origin |
| -b, --branch | Git branch to push to | main |
| -a, --amend | Amend the last commit instead of creating a new one. | false |
| -np, --no-push | Skips the git push step | false |
| -po, --push-only | Skip staging/commit. Only pushes to remote branch. | false |
| -nv, --no-verify | Hooks are skipped using git flags | |
| -h, --help | Show help information | |
📝 Examples
# Use `gitgc` to commit and push changes if you installed it globally
gitgc "fix: resolve issue with DataTable filter state"
# Simple commit and push
npm gitgc "fix: resolve issue with DataTable filter state"
# Commit specific file
npm gitgc "style: update item alignment in CSS" --files src/header.css
# Amend the previous commit and skip push
npm gitgc "fix: reword commit" --amend --no-push
# Push to different remote and branch
npm gitgc "feat: deploy script added" --remote origin --branch dev
# Skip hooks (e.g., Husky)
gitgc "fix: skip hooks" --no-verify
# Interactive mode (no commit message)
npm gitgc🔍 Features
- Prompt-based fallback if no message is provided
- Checks for uncommitted changes before committing
- Safe defaults with room for customization
- Clean CLI experience with color-coded output
- By default,
gitgcrespects all Git hooks (like Husky’spre-commit,commit-msg,pre-push).
🧑💻 Author
📄 License
MIT License
