Skip to content

A lightweight CLI tool that automates `git add`, `git commit`, and `git push` — with optional flags for flexibility.

Notifications You must be signed in to change notification settings

SaroarShahan/gitgc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 @saroarshahan/gitgc

A lightweight CLI tool that automates git add, git commit, and git push — with optional flags for flexibility.


📦 Installation

npm yarn
npm install -g @saroarshahan/gitgc
yarn global add @saroarshahan/gitgc
npm install @saroarshahan/gitgc
yarn 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, gitgc respects all Git hooks (like Husky’s pre-commit, commit-msg, pre-push).

🧑‍💻 Author

Saroar Shahan
GitHubNPM

📄 License

MIT License

About

A lightweight CLI tool that automates `git add`, `git commit`, and `git push` — with optional flags for flexibility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published