3 ms·
One-liner to automate your Git commit messages using ChatGPT
# install
pip install shell-gpt
sgpt "hi" (and enter your API key)
# commit the current folder with the generated message
git commit . -m "$(git diff | sgpt --code 'Based on the changes above, generate an expertly crafted concise commit message following best practices')"
- syndicatedjelly 3y agoI did not know you could inject code into a commit message. Wow that’s terrifying
- thomashop 3y agoBash runs the code before and then calls git commit.