This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ----------------------------------------------------------------------------- | |
| # AI-powered Git Commit Function | |
| # Copy paste this function into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
| # 1) Checks if there are any staged changes | |
| # 2) Gets the current staged changes diff | |
| # 3) Sends the diff to an LLM to generate a structured summary of changes | |
| # 4) Sends the diff to an LLM to write a git commit message | |
| # 5) Allows you to easily accept, edit, regenerate, or cancel the commit | |
| # 6) Provides timestamp for successful commits or cancellations | |
| # |