Created
December 2, 2024 16:45
-
-
Save gregsadetsky/016a407dc86ace06832864295336d018 to your computer and use it in GitHub Desktop.
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
[alias] | |
cm = commit -m | |
a = ! git add -N . && git add -p | |
d = diff | |
dc = diff --cached | |
l = log | |
s = status | |
p = push | |
m = merge | |
master = checkout master | |
main = checkout main | |
b = checkout -b | |
alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ / | |
editconfig = config --global --edit | |
addpush = ! git add . && git commit -m "." && git push | |
co = checkout | |
[core] | |
editor = /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -n -w | |
[user] | |
name =YOURNAME | |
email = [email protected] | |
[push] | |
autoSetupRemote = true |
ok, I just setup the llm commit message thing.
- install https://github.com/simonw/llm
- install https://github.com/simonw/llm-claude-3/ afterwards (i.e.
llm install llm-claude-3
) - run
llm keys set claude
- test it:
llm -m claude-3.5-haiku "what is the capital of france"
- add the following git alias
cmai = ! git diff --cached | llm -m 'claude-3.5-haiku' 'Below is a diff of all staged changes, coming from the command:\\n```\\ngit diff --cached\\n```\\nGenerate a SUPER concise, **one-line** commit message for these changes. Do not yap. Only return the commit message. Nothing else.' | git commit -F -
... I should modify g addpush
to use this, one thing at a time.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in my
~/.bash_aliases
I also have:g addpush
is (unfortunately) completely addictive. you will never look back. use with (no) moderation.EDIT: if an LLM checked the commit diff and actually generated a better commit message than ".", I'd actually be into that, but it would have to return a result within 2-3-4 seconds max, otherwise it breaks the flow/pleasure of
g addpush
:-)