TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Gptcommit: Never write a commit message again (with the help of GPT-3)

125 点作者 zurawiki超过 2 年前

36 条评论

ketralnis超过 2 年前
I don&#x27;t really ever want to read answers from GPT to questions that I didn&#x27;t knowingly myself ask GPT. If GPT can write a commit message from you, don&#x27;t write it at all and let me ask it that if that&#x27;s what I want. It may be a positive to you to spend a few seconds less on commit messages but it&#x27;s a net negative for the world for it to become polluted with vast amounts of flatly incorrect text with no knowledge as to its provenance. I&#x27;d rather have no commit message than one that I can&#x27;t trust whether it&#x27;s written by the same human that wrote the code or not.<p>Put another way, you asking GPT for stuff that it learned from Stack Overflow: good. Using it to post to Stack Overflow: bad.
评论 #34447060 未加载
评论 #34447992 未加载
评论 #34448310 未加载
评论 #34446812 未加载
pachico超过 2 年前
I find commit messages have more value when they don&#x27;t just repeat what you can see by looking at a diff but when they explain the reasons behind.
评论 #34446701 未加载
评论 #34446048 未加载
评论 #34446512 未加载
smashedtoatoms超过 2 年前
Because what we need is more of the what was done, with no regard to the why. Why provide any context as to why the change was made when you can fill it with an AI description of what one could accurately tell by looking at the code? I kinda can&#x27;t believe this isn&#x27;t a joke. Just squash it to the emoji that best captures the sentiment! Why use the tool to enhance you and your peers lives, when you can use AI to make it pointless!
评论 #34447475 未加载
NBJack超过 2 年前
Neat concept, but this opens up a can of worms for corporate security. Pretty sure I won&#x27;t get approval to submit proprietary code to a third party service just because I was too lazy to write a few lines of text. Might be helpful to open source projects?
评论 #34445977 未加载
polemic超过 2 年前
The very last thing you should do is commit a GPT-3 generated commit message for a fairly simple reason: if GPT-3 can interpret and and explain the change as written, <i>there is no reason to commit that message.</i> You will always be able re-run the generator at any later date, over any range of changes, to get the same or (presumably, in future) improved results.<p>As pointed out by other comments, the commit message should be telling you facts about the change that are not evident from the change itself. GPT-3 can&#x27;t tell readers <i>why</i> the change happened.
0x000xca0xfe超过 2 年前
Writing commit messages (or comments in general) is like practicing vocabulary, but for your mental understanding of the current problem.<p>Taking a step back and thinking about what I have actually done often helps me to find misconceptions, the worst bugs of them all.<p>Automating this away would be like learning a foreign language by pasting book exercises into a translation app... you may get good grades, but does it help your understanding if you didn&#x27;t put in the effort yourself?
评论 #34447578 未加载
jim-jim-jim超过 2 年前
In the early days of Covid, the web was awash with all sorts of stupid fucking designs that reimagined public space under the new normal or whatever. It was chaff that creators and readers alike knew would never be put to practical use, or even be produced in the first place. There&#x27;s a good writeup about it here.<p><a href="https:&#x2F;&#x2F;mcmansionhell.com&#x2F;post&#x2F;618938984050147328&#x2F;coronagrifting-a-design-phenomenon" rel="nofollow">https:&#x2F;&#x2F;mcmansionhell.com&#x2F;post&#x2F;618938984050147328&#x2F;coronagrif...</a><p>I think the same phenomenon is at play here. Everybody sharing their own silly parrot tricks: it&#x27;s the least interesting topic in the world right now.
Rogach超过 2 年前
I don&#x27;t want to debate the presence or absence of merits in this tool (these are extensively covered in other comments), but I want to point out that even in the demo examples 2 out of 3 commit messages are plainly incorrect:<p>- in Demo 1 tool wrote &quot;Switch to colored output...&quot; while in the diff we can see that colored output was already present;<p>- in Demo 3 tool wrote &quot;Add installation options and demo link to README&quot;, while in the actuall diff we only see a link being added, no changes to installation options.<p>Props to the author for being honest and not cherry-picking the examples.
haney超过 2 年前
This is interesting but I’d hate to work on a project where this was used. Commits should tell me why a change happened not just what code changed.
gkfasdfasdf超过 2 年前
To everyone hating on this...I think a GPT-3 summary of a diff is a great thing to have, because it&#x27;s a <i>summary</i> of the change and thus can be quicker to grok than picking through a diff. Also this doesn&#x27;t seem to preclude a developer adding their own text to the commit (the why, etc). Finally, if the summary looks weird&#x2F;incoherent it could serve as a signal to the developer that the commit needs more work.
评论 #34452464 未加载
SketchySeaBeast超过 2 年前
I can kind of understand getting help writing the description of a large PR. But a commit message? Whose commits are so long so often that they need the help of an AI assistant to come up with the contents?
评论 #34446497 未加载
darekkay超过 2 年前
With WhatTheCommit [1], I never have to come up with commit messages again. &#x2F;s<p>I even wrote an IntelliJ IDEA plugin 9 years ago [2]. Half as a joke, half to learn about IDEA plugin development. I&#x27;m puzzled by seing so many people actually using it. Last month the HTTP link became invalid, and soon after someone opened a PR with a fix. I really hope noone actually uses those commit messages on shared repositories.<p>[1] <a href="https:&#x2F;&#x2F;whatthecommit.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;whatthecommit.com&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;darekkay.com&#x2F;blog&#x2F;what-the-commit-plugin-for-intellij-idea&#x2F;" rel="nofollow">https:&#x2F;&#x2F;darekkay.com&#x2F;blog&#x2F;what-the-commit-plugin-for-intelli...</a>
yowlingcat超过 2 年前
The worst part about GPT-3 is people using it to automate things where the entire value comes from what the human annotates rather than automates. This is an idea, which like many others involving GPT-3, which I believe will destroy more value than it creates.
zactato超过 2 年前
Did the OP use the tool to write his own commit messages?<p>A lot of the commit messages were typical and sort of redundant but this one stood out to me <a href="https:&#x2F;&#x2F;github.com&#x2F;zurawiki&#x2F;gptcommit&#x2F;commit&#x2F;82294555e7269e6d53987e5cc4dc02e0478bf6c1">https:&#x2F;&#x2F;github.com&#x2F;zurawiki&#x2F;gptcommit&#x2F;commit&#x2F;82294555e7269e6...</a><p>&quot;Add github token to address GH Workflow rate limits&quot;<p>This is a good commit message, it describes a problem and a solution. I&#x27;d be very impressed if the GPTCommit tool wrote this and knew why the github token was being added.
avgcorrection超过 2 年前
There are tools that I wish didn’t exist and this is one of them.
FastEatSlow超过 2 年前
Perhaps this could be more useful if it could be fed information from a bug tracker, so it could use the context to create a meaningful (if inaccurate) commit message.
tjpnz超过 2 年前
If you&#x27;re unable to write your own commit messages that&#x27;s a strong signal to me that either your commits are too large or that you&#x27;re unable to explain in simple words what you just did. While the first can be remedied I would find it hard working with someone who consistently displayed the second.
AnimalMuppet超过 2 年前
1. If automating writing commit messages significantly improves your experience as a developer, you&#x27;re doing something wrong.<p>2. If GPT-3 can write commit messages even close to as clear as you can, <i>you&#x27;re doing something wrong.</i>
warkanlock超过 2 年前
The peak of human society right here
micimize超过 2 年前
Comments here are acting like you can&#x27;t add&#x2F;edit the commit. It offers a starting point. Yes it&#x27;s just-above-diff level, but it is at-least-above-diff level.<p>But my main though is that IDK about using this for anything closed source. Feed openai&#x27;s API your codebase, one commit at a time. Even if they promise not to train on your prompt history today, ToS could change. Seems fine if you run it locally though.
xg15超过 2 年前
Fun fact: you can probably turn this around too: Write a fictional commit history and have ChatGPT generate the actual commits for you.
joshe超过 2 年前
This is fun.<p>Would also be cool to generate commit messages while viewing history, it could really do a good job of orienting you. I&#x27;m imagining &quot;human commit msg | gpt commit msg&quot; so you can look at both. It&#x27;s a little simplistic right now, kinda just describes the diff, but GPT-3.2 could rock.
rawfan超过 2 年前
At least the first line of commit messages shouldn’t describe WHAT changed but WHY the change was made.
nora-puchreiner超过 2 年前
I was wondering if there is a possibility of obtaining an offline version of the service, in order to mitigate the inherent risks associated with transmitting proprietary code to external servers, thus ensuring optimal security and confidentiality of said code?
failuser超过 2 年前
Cool, but I hope his is never used as is, just submit with some keyword and call the latest version of GPT on the diff when looking through the history later. A bad commit message is worse than no message and it can’t be easily fixed.
hooande超过 2 年前
I like writing commit messages. I find it helps me to think through and explain the change that I&#x27;m committing. personal quirk: for major commits I&#x27;ll add fun ascii art, just as a treat
abi超过 2 年前
If you&#x27;re looking for a Python variant of this tool: <a href="https:&#x2F;&#x2F;github.com&#x2F;abi&#x2F;autocommit">https:&#x2F;&#x2F;github.com&#x2F;abi&#x2F;autocommit</a>
coding123超过 2 年前
The repo for this isn&#x27;t eating it&#x27;s own dogfood.
ilikehurdles超过 2 年前
Might as well commit “I don’t remember writing that commit” because that’s going to be your every answer when someone has a question about what you did.
jupp0r超过 2 年前
This is horrible. Commit messages should contain the reason why this change has been made and not imprecise prose summaries of what the diff looks like.
评论 #34447444 未加载
dragonwriter超过 2 年前
Be more impressed if I write the commit message and GPT writes the code than vice versa.<p>If I wrote the code, writing a commit message is trivial.
评论 #34447650 未加载
BuckyBeaver超过 2 年前
I&#x27;ll write a shitload of commit messages before I&#x27;ll give OpenAI my phone number.
LeicaLatte超过 2 年前
I don’t get the hate. Don’t use it all the time, but this could be useful as part of a danger report.<p>A readable summary for the ones who may not understand code - your developer will never write that.
tobyhinloopen超过 2 年前
Why are the demos videos?
sigmonsays超过 2 年前
this is awful.
xrd超过 2 年前
Now do this for branching strategies.<p>This is amazing. Humans should only need to read commit messages, never write them.