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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Gitgpt – Natural Language Git

108 点作者 OddMerlin大约 2 年前
Hey folks,<p>Here&#x27;s a quick and dirty tool to use natural language to get git to do what you want.<p>Example: $gitgpt create a new branch called feature&#x2F;test add all the files and commit with msg creating feature test then push to origin<p>I haven&#x27;t put it through the wringer yet, however it&#x27;s worked well with some pretty straight forward day to day git usage.

24 条评论

notShabu大约 2 年前
It&#x27;s pretty useful as a lookup, but these tools are similar to a knife that auto-magically orients itself to help with cutting.<p>Some tools should be as dumb as possible so that act as extensions of the user with zero tolerance.<p>Play and buffer between intent and action creates a long tail of potentially disastrous unknown edge cases and also interferes with the feedback loop that prevents mastery.<p>Memorizing git commands to get it just-so is usually a chore so this is pretty helpful. Still wouldn&#x27;t trust it w&#x2F;o double checking the output cmd though.
评论 #34966658 未加载
评论 #34963141 未加载
gdcbe大约 2 年前
Not sure what value it adds though. Isn’t it easier to type the cmds then to write all that?<p>If there’s a good product in it I’m afraid your examples aren’t selling it :S<p>Was first thinking it could have value for when you forget a cmd or when learning, but I think if you can come up with those technical instructions you can also remember the cmds …
评论 #34960518 未加载
评论 #34960821 未加载
评论 #34961015 未加载
评论 #34961493 未加载
评论 #34960574 未加载
评论 #34960709 未加载
评论 #34960981 未加载
midenginedcoupe大约 2 年前
Or we could get off the cargo-cult need to use git on every single project everywhere regardless of how suitable it is for that team&#x27;s needs.<p>If your tool of choice is so actively user-hostile that it needs another tool on top to understand it for you, then perhaps you&#x27;ve picked the wrong tool. I don&#x27;t need to read the &quot;vi book&quot; to understand how to perform basic edits to my files without borking it in ways that just deleting the whole thing and restoring from backup is the easiest way out. Why should it be the case for my revision control system?<p>Why a revision control system designed for a de-centralised team sharing patches over email has become the industry standard for centralised teams not sharing patches over email is a mystery, and I suspect one we&#x27;ll look back on in 10 years or so and wonder what on earth we were thinking.
评论 #34967055 未加载
评论 #34967135 未加载
tuukkah大约 2 年前
The prompt is to the point:<p><pre><code> prompt = &quot;Provide only the appropriate git commands for:&quot; + prompt </code></pre> <a href="https:&#x2F;&#x2F;github.com&#x2F;Hesse&#x2F;gitgpt&#x2F;blob&#x2F;9c78e40d5ebdefdf0a4a8297d2f88b5a8d82ffad&#x2F;main.go#L44">https:&#x2F;&#x2F;github.com&#x2F;Hesse&#x2F;gitgpt&#x2F;blob&#x2F;9c78e40d5ebdefdf0a4a829...</a>
评论 #34966551 未加载
antibasilisk大约 2 年前
let&#x27;s not give language models unrestricted access to our shells please. This is like allowing remote code execution from an insane person.
评论 #34966398 未加载
SparkyMcUnicorn大约 2 年前
Nice! I don&#x27;t intend to discount the work you&#x27;ve done here, but want to point out that GitHub Copilot has a CLI tool for exactly this as well as other arbitrary shell commands. It&#x27;s pretty polished and has performed well for me so far.<p>It is on a waitlist, but I got accepted after a couple weeks.<p><a href="https:&#x2F;&#x2F;githubnext.com&#x2F;projects&#x2F;copilot-cli&#x2F;" rel="nofollow">https:&#x2F;&#x2F;githubnext.com&#x2F;projects&#x2F;copilot-cli&#x2F;</a>
AlexAltea大约 2 年前
That looks cool, though I&#x27;d be very concerned about the possibility about ChatGPT &quot;hallucinating&quot; a `rm -rf &#x2F;` or equivalent.
评论 #34961466 未加载
评论 #34961407 未加载
评论 #34961715 未加载
评论 #34961524 未加载
tempodox大约 2 年前
I feel like we have reached the “solution in search of a problem” stage.
basicallydan大约 2 年前
&gt; Interfacing with git sucks<p>I disagree
jastanton大约 2 年前
I&#x27;ve been looking for something similar for AI git commit messages... basically feed ChatGPT a git diff and ask it what changed and to write a git message. I&#x27;ve done this directly in the ChatGPT UI with some small changes and it produces some great messages...<p>I would be very concerned to run this on company code or large diffs. But small simple commits, which should be the goal with commit messages anyways, would take away some of the tedium of the git flow.
评论 #34961546 未加载
visarga大约 2 年前
But ... can it unbreak a broken merge? It should at least take a look at the git state before executing. There is potential in explaining to the user what is happening.
评论 #34967786 未加载
yodon大约 2 年前
I&#x27;ve been waiting for someone to build this. My hope is it will simplify recovering from the myriad forms of &quot;I just did something I didn&#x27;t want&quot; that occasionally happen with git (and that I&#x27;ve historically used [0] to resolve)<p>[0]<a href="https:&#x2F;&#x2F;sethrobertson.github.io&#x2F;GitFixUm&#x2F;fixup.html" rel="nofollow">https:&#x2F;&#x2F;sethrobertson.github.io&#x2F;GitFixUm&#x2F;fixup.html</a>
ilaksh大约 2 年前
This is cool but I tried sending the same text with my general purpose GPT (text-davinci-003) command line tool and it did the same thing. This one is mine: <a href="https:&#x2F;&#x2F;github.com&#x2F;runvc&#x2F;askleo">https:&#x2F;&#x2F;github.com&#x2F;runvc&#x2F;askleo</a><p>There are other ones of course.
评论 #34961047 未加载
评论 #34961073 未加载
评论 #34961062 未加载
jefurii大约 2 年前
I&#x27;d like to see a GPT tool that had ingested the manpages and documentation for all the tools I use, answer my questions based on that. I will type in the commands myself. Bonus points if it included links to the docs so I can double-check.
gigantino大约 2 年前
Absolutely wasted opportunity. You could have called it &quot;Chat GitPT&quot;
phneutral26大约 2 年前
I think this would be a wonderful tool for git learners if you would explain the git commands a bit. For example: git add *.py ; This command adds all the python files to the staging list.<p>You get the gist.
评论 #34960808 未加载
nathias大约 2 年前
&gt; Interfacing with git sucks.<p>I really don&#x27;t get this sentiment, to me git is one of the best software ever written, it&#x27;s intuitive, customizable and extensible.
dudus大约 2 年前
I think this is a cool idea but why stop at git? Why not expand to any CLI program. Maybe someone already did that.
评论 #34967051 未加载
hn_throwaway_99大约 2 年前
This is very cool. I feel like this should be an eventual good replacement for essentially all man&#x2F;help pages.
la64710大约 2 年前
All these tools need openAI keys … give me one model that is self hosted with an API endpoint …
eurasiantiger大约 2 年前
Can it fix merge conflicts?
junon大约 2 年前
&gt; Interfacing with git sucks<p>[citation needed]
hyperthesis大约 2 年前
<p><pre><code> c++gpt</code></pre>
whoomp12342大约 2 年前
thanks, I hate it.