Skip to content

Instantly share code, notes, and snippets.

View haje01's full-sized avatar

Kim Jeong Ju haje01

View GitHub Profile
@haje01
haje01 / add_to_zshrc.sh
Last active November 13, 2024 09:59 — forked from karpathy/add_to_zshrc.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
# 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() {