Files
gims/README.md
T
Sairaj Jawalikar 79fd2748c0 Update README.md
2025-06-16 02:51:47 +05:30

2.1 KiB

GIMS

Git Made Simple


🚀 Installation

npm install -g gims

This installs the gims command and a shortcut alias:

g  # shortcut for gims



🔧 Environment Setup (Optional for AI)

To enable AI-generated commit messages:

Option 1: Gemini API

export GEMINI_API_KEY='your_gemini_api_key'

Option 2: OpenAI API (used if Gemini key not found)

export OPENAI_API_KEY='your_openai_api_key'

If neither is set, it defaults to a generic commit message.



🧠 AI Commit Modes

1. Commit Locally with AI Message

g l      # or gims local

→ Adds and commits current changes locally with a descriptive commit message generated by AI.

2. Commit & Push with AI Message

g o      # or gims online

→ Adds, commits, and pushes the current changes to the remote branch.



📚 Version History Navigation

View Git Logs (Short)

g ls     # or gims list

→ Shows a numbered short log:

1. 1234abc Added login feature
2. 5678def Fixed bug in auth flow

View Git Logs (Full)

g ll     # or gims largelist

→ Full git log (without pager).



🌿 Branching & Resetting

Create Branch from a Commit or Number

g b 2 try-new-idea

→ Branches off from commit #2 (resolved via g ls) into a new branch try-new-idea.

Reset to a Commit or Number

g r 1 --hard

→ Resets the current branch to commit #1 permanently (--hard is optional).

Revert a Commit or Number

g rv 3

→ Reverts changes made by commit #3 (safe, non-destructive).



🆕 Git Init

g i      # or gims init

→ Initializes a new Git repository.



📝 Example Workflow

cd myproject/
g i                         # Initialize repository
touch index.js              # Add file
g l                         # Auto commit locally with AI
g ls                        # See commit history
g b 1 try-feature           # Branch out from earlier version