first β let's grow my twitter, so i can tell about my inventions quicker and make the world even better place (or not, idk)
I've been struggling making commit messages since 2017.
When you think of a commit message β you switch context from writing code. When you switch context β you waste time. Wasting time is lame.
I usually made 1 line commits like "amends", "fixed bug", "refactoring", "refactoring 2", "final refactoring" and then tried to come up with a good general message when merging a branch to production.
It has changed with THE FIRST AI REVOLUTION :)) I mean all this GPTs..
Two weeks ago I open-sourced OpenCommit. It can answer WHY the change was done if you change model to GPT-4 in settings! Insane.
The lib uses conventional commits convention which makes commits meaningful. You can also turn on GitMoji setting if you like. And select different languages and many other features (I got 12 PRs so far)
Simply install it with npm:
npm i -g opencommit
After installing type oc
and hit "Enter" in a terminal:
oc
If you want OpenCommit to be used by your IDE do:
oc hook set
That's it.
For more features read the docs.
you may follow my twitter or not
btw, i have one more great tool for making GPT write extremely accurate code for you https://dev.to/disukharev/aitdd-ai-cli-for-tdd-you-write-the-test-ai-makes-it-green-32bn
Latest comments (69)
Getting this error while trying to generate the commit message
connect ECONNREFUSED ::1:80
Anyone having the same issue?
Hello. Love the religious wars, very educational and very respectful.
Please can you create a bot that 'unpick's (pun intended) my spaghetti diff commits into nice atomic commits following git flow conventions, running tests and squashing bug fixes?
kthxbi
You could try something like this...
Company policy requires commit messages explain the "why" of the check-in and not the "what". Can you ask me questions regarding why I made the changes in this commit and then write a professional, technically accurate, succinct commit message for me?
If we donβt know why we work on some bug fix or feature, and need GPT to write our commit messages, I donβt think that an AI will be helpful. Writing a commit message is a full part of communicating with other and make important reflexion progress. If we delegate that, I am almost sure we miss something.
This is a great idea. I'd love to see you edit the prompts to have GPT follow conventional commits in it's output.
Can I force the commit and push immediately after running "oc" without checking the message?
Thinking about what you are doing is not a waste of time its a part of our job as engineers! π
Impressive how many people put so much effort to invalidate your creation.
"Commits should describe WHY, not WHAT."
Okay. Push a bunch of commits generated by the extension. Before you merge your PR, just squash it and name it whatever you prefer. Done. You got your WHY, but spent no time writing a bunch of other mini commits that probably no one cares after your PR is merged.
Nice work Dima! Not every innovation fits everyone unfortunately.
First of all no good dev commits like the "before", secondly, I doubt GPT is able to understand the scope of a task and the project. The commit message should be a meaningful short message to understand what was done in the scope of the task/project, and not just list all the changes, which can be observed by checking the diff.
How about this? Who is better?
aicommits
Their messages are in past tense lol