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.
- 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
.
Ensure you have Node.js and npm installed on your system.
To install gic
globally, run:
npm install -g @souvik666/gic
This will allow you to run the gic
command globally from anywhere in your terminal.
If you want to install gic
for a specific project, run:
npm install @souvik666/gic --save-dev
Then, you can use npx
to execute the command without needing to install it globally:
npx gic --help
To use GIC, run the following command to see the help options:
gic --help
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.
You can perform a "dry run" to preview the commit without actually committing:
gic --dry-run
This will show the commit preview without applying any changes.
By default, GIC uses the following commit message tags:
-
🔧 UPDATED
for modified files. -
✨ ADDED
for new files. -
🗑️ REMOVED
for deleted files. -
📄 NEW
for new, untracked files. -
🔄 OTHER
for other changes.
These tags can be customized in the gic.config.json
file.
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.
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.js
- 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.
-
Dry Run: Preview your changes before actually committing them:
gic --dry-run
-
Custom 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.
-
Permission Denied: If you're unable to install the package, ensure you're running with the appropriate permissions or use
sudo
for global installations. -
Command Not Found: Ensure that
gic.sh
is marked as executable and properly linked in thebin
section of yourpackage.json
.
chmod +x gic.sh
Run the following command to install GIC globally:
npm install -g @souvik666/gic
Yes, you can customize the commit tags by modifying the gic.config.json
file in your project.
Use the --dry-run
option to preview your commit before it’s made:
gic --dry-run
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.
GIC is licensed under the ISC License.