Skip to content

Instantly share code, notes, and snippets.

@BilalBudhani
Last active February 7, 2025 05:02
Show Gist options
  • Save BilalBudhani/38404f9176b25710b8ced121c3934931 to your computer and use it in GitHub Desktop.
Save BilalBudhani/38404f9176b25710b8ced121c3934931 to your computer and use it in GitHub Desktop.
Using AI to generate git commit message based on the files changed
alias aigc="git --no-pager diff HEAD --raw -p | llm -m 4o-mini -s 'You have been provided with the raw output of git diff command. Generate a single line meaningful yet concise commit message' | git commit -a --file -"
### Pre-requisites
To be able to run the command these are the dependencies required
- git
- llm (https://github.com/simonw/llm)
- Open AI API key
### How Run
Run `aigc` inside any git repository folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment