@souvik666/gic
v1.1.4
Published

Readme
GIC (Git Commit Automation Script) - Command Line Tool
Overview
GIC is a powerful, user-friendly Git commit automation tool that simplifies and customizes your Git commit process. With GIC, you can easily automate Git commits with detailed messages, custom tags, and much more. It enhances the commit workflow, especially for teams working on feature branches or managing multiple repositories.
Features
- Custom Commit Messages: Add a custom commit message or use the default tags for changes.
- Commit Preview: See a preview of your commit message before applying it.
- Tag Customization: Customize the commit tags (
Updated,Added,Removed, etc.) with your own labels. - Dry Run Mode: Preview commits without actually committing any changes.
- Cross-platform Support: Fully supports Linux, macOS, and Windows.
- Integrates with Git: Automates Git commands such as
git add,git commit, andgit push.
Installation
Prerequisites
Ensure you have Node.js and npm installed on your system.
Global Installation
To install gic globally, run:
npm install -g @souvik666/gicThis will allow you to run the gic command globally from anywhere in your terminal.
Local Installation
If you want to install gic for a specific project, run:
npm install @souvik666/gic --save-devThen, you can use npx to execute the command without needing to install it globally:
npx gic --helpUsage
Basic Command
To use GIC, run the following command to see the help options:
gic --helpCommit Changes with Custom Message
To make a commit with a custom message:
gic -m "Custom commit message"This will add all the changes, generate a commit message with the custom content at the top, and then display a preview of the commit before applying it.
Dry Run Mode
You can perform a "dry run" to preview the commit without actually committing:
gic --dry-runThis will show the commit preview without applying any changes.
Default Commit Message Tags
By default, GIC uses the following commit message tags:
🔧 UPDATEDfor modified files.✨ ADDEDfor new files.🗑️ REMOVEDfor deleted files.📄 NEWfor new, untracked files.🔄 OTHERfor other changes.
These tags can be customized in the gic.config.json file.
Configuration
Customizing Commit Tags
To customize the commit message tags (e.g., change 🔧 UPDATED to 🔨 CHANGED), create a gic.config.json file in your project root:
{
"modified": "🔨 CHANGED",
"added": "✨ NEW FEATURE",
"deleted": "🗑️ DELETED",
"new": "📄 NEW FILE",
"other": "🔄 ALTERED"
}GIC will automatically load the tags from this configuration file if it exists.
Example Commit Message
Here’s an example of a generated commit message:
(#123) [2025-02-05 14:30:00] Fixed login issue
✨ ADDED: src/components/Login.js
🔧 UPDATED: src/api/auth.js
🗑️ REMOVED: src/utils/deprecatedFunction.jsDetailed Breakdown:
- The issue number (
#123) is automatically detected from the branch name. - The commit message timestamp (
2025-02-05 14:30:00) is dynamically added. - Each change is tagged with customizable icons like
✨ ADDED,🔧 UPDATED, etc.
Advanced Options
Dry Run: Preview your changes before actually committing them:
gic --dry-runCustom Message: Add a custom commit message:
gic -m "Fixed login issue"No Changes Detected: If there are no changes to commit, the tool will display:
No changes to commit.
Troubleshooting
Common Errors
- Permission Denied: If you're unable to install the package, ensure you're running with the appropriate permissions or use
sudofor global installations. - Command Not Found: Ensure that
gic.shis marked as executable and properly linked in thebinsection of yourpackage.json.
chmod +x gic.shFAQ
1. How do I install GIC globally?
Run the following command to install GIC globally:
npm install -g @souvik666/gic2. Can I customize the commit tags?
Yes, you can customize the commit tags by modifying the gic.config.json file in your project.
3. How do I test my changes before committing?
Use the --dry-run option to preview your commit before it’s made:
gic --dry-runContributing
We welcome contributions to GIC! If you would like to contribute, please fork the repository and submit a pull request. Make sure to follow the code style and write tests for new features.
License
GIC is licensed under the ISC License.
