Skip to content

Instantly share code, notes, and snippets.

View adagolodjo's full-sized avatar

Yinoussa Adagolodjo adagolodjo

View GitHub Profile
@adagolodjo
adagolodjo / git_commit_ollama.sh
Created August 26, 2024 21:33 — forked from nikolaydubina/git_commit_ollama.sh
Git Commit Message AI
# -----------------------------------------------------------------------------
# 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
# based on https://gist.github.com/karpathy/1dd0294ef9567971c1e4348a90d69285
gcm() {
# Function to generate commit message