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 | |
| # |
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 gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
| # 1) gets the current staged changed diff | |
| # 2) sends them to an LLM to write the git commit message | |
| # 3) allows you to easily accept, edit, regenerate, cancel | |
| # But - just read and edit the code however you like | |
| # the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
| gcm() { |