Show HN: Gitgpt – Natural Language Git (github.com)
Hey folks,
Here's a quick and dirty tool to use natural language to get git to do what you want.
Example: $gitgpt create a new branch called feature/test add all the files and commit with msg creating feature test then push to origin
I haven't put it through the wringer yet, however it's worked well with some pretty straight forward day to day git usage.
91 comments
[ 2.7 ms ] story [ 163 ms ] threadYou get the gist.
Also GPT-based
If there’s a good product in it I’m afraid your examples aren’t selling it :S
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 …
Obviously it is if you know them.
Understanding what you can tell gitgpt to do is extremely adjacent to knowing actual git commands.
It's adjacent but it's not the same. Knowing that you can get git to give you a bisect of two branches starting 3 commits ago with a short log description is quite different to knowing the command to do it.
But with a command line tool like Gitgpt I guess one could just do:
> gitpgt "revert commit without commiting"
and the command line tool would answer "git revert --no-commit COMMIT_ID_HERE". I think that's quite handy and way faster then options a), b) and c)
> But with a command line tool like Gitgpt I guess one could just do:
>> gitpgt "revert commit without commiting"
This is a classic post-hoc curse of knowledge fallacy. I don’t blame you, this is something that people with really analytically strong minds struggle with, such as the fine folks who made voice assistants for Google, Apple and Amazon.
Asking someone who is trying to be overly helpful to do something you don’t know if they can do is at best meaningless (if it can’t do any harm) and at worst a really bad idea (if it can eg screw up your git repo). In your friend’s mind, it’s very possible that git can’t do this, and then who knows what the GPT will try to do instead to please you? This is the main crux of the problem.
Even if they think it’s possible but they don’t know the command, they don’t know if “revert without committing” is a meaningful sentence, perhaps git has another abstraction model and uses different terms. This is the spirit behind the expression “asking the right question takes as much skill as giving the right answers”.
GPT can certainly help explaining, summarizing etc, but it has a very limited ability to say no, and more generally pointing out when your mental model is wrong. I’ve had long complex “design reviews” with ChatGPT – it’s really good at going along with your assumptions, but it lacks the “spine” to tell you when your logic isn’t coherent, or that you have mutually exclusive goals, or that you’ve strayed “too far”, whatever that means.
Someone should write a long blog post about this paradox of helpfulness, I assure you it’s a real thing!
Like, oops not add I meant push, wait remove that! or was it rebase? I'll just reflog to get back to umm... wait what?
I guess the saving grace is that it'll do the most common things people usually want to do, but for some things english language just not specific enough (like law).
It's pretty obvious it's intended use cases include memory prompts for experienced users and translations from English requirements for inexperienced users.
It's even in the OP:
use natural language to get git to do what you want.
> add .gitignore commit with msg adding ignore and push
That's not very compelling. The main selling point of AI is using simple inputs to achieve advanced outputs that match what the user wanted.
If I can say "Commit my .gitignore file," and then it runs
git add .gitignore
git commit -m "Adding .gitignore"
git push [y/N] y
Then that's one thing.
But this looks like you still have to specify the exact message you want, and be pretty deliberate about what it is you're after. At that point, why not just learn, and write, the commands yourself?
Keeping the commands as succinct as possible as well as "natural language" as possible. Even the word commit might be too git-y?
Thanks for the feedback.
So for developer using it 8h a day, yeah, funny toy, but might actually be useful for every other git usage when users don't want to understand graph theory just to commit some changes.
Should we really trust Google's search AI, which is also always under attack by SEO spam, to give reliable results?
I have about as much trust in Google's result page as in ChatGPT responses. I don't trust Google to give me exactly what I'm really looking for, so I force myself to look for a number of sources which corroborate a claim.
I am increasingly considering self-hosting a YaCy instance configured with a curated whitelist of allowed domains (in this case, I might add the GitHub docs and/or the Atlassian git docs pages to be certain that I'm reading valid and up-to-date instructions when searching for git-related topics).
[0]https://sethrobertson.github.io/GitFixUm/fixup.html
There are other ones of course.
1. text-davinci-003 is subjectively (well, and objectively) better than other models
2. for small-ish usage volume, Davinci and Curie are both pretty cheap in absolute terms that a 10x factor doesn't matter
3. GPT3 hype
https://github.com/runvnc/askleo
It is on a waitlist, but I got accepted after a couple weeks.
https://githubnext.com/projects/copilot-cli/
[0] https://github.com/danthelion/git-genie
When LLMs “hallucinate” they don’t do so in random ways like somehow deciding to “rm -rf /“. They do so in predictable ways.
What, am I supposed to handhold every person in these forums until they stop reading garbage on the internet and start either doing their own empirical research or at least read other empirical research?
Edit: Apparently the answer is yes, I am supposed to handhold every person in these forums… and I will tirelessly do so, even in the face of provocatively incorrect yet populist statements like OPs… I still imagine I lose my patience every 100 or so instances, as seems about the average these days…
> Be kind. Don't be snarky. Converse curiously; don't cross-examine. Edit out swipes.
> Please don't fulminate. Please don't sneer, including at the rest of the community.
https://news.ycombinator.com/newsguidelines.html
If you get tired of respectfully explaining why people are wrong, then you can always stop commenting and go get some fresh air. What you should not do is lash out aggressively with zero explanation for why you feel so strongly about this.
Funny enough, I reviewed your comment history and you seem to be of the same opinion as the person I was responding to…
…could that have perhaps motivated your patronizing tone?
I note that the conversation that started from your re-submitted (and much improved) comment was quite productive and insightful on all sides, which is exactly what the site guidelines are designed to enable.
What you’re missing from your perspective is that the original comment was aggressively wrong.
This is of course to be expected based on those that are optimizing to be rewarded primarily for their opinion and not for how it is stated.
I don’t find your argument convincing because I am not purposefully ignoring the social context. Your intentions are suspect, even if they are subconscious.
Like, if I’m unreasonably polite in response, downvotes. If I’m reasonably impatient, downvotes.
What exactly am I to infer here?
https://arxiv.org/abs/2202.03629
But you can get a general feel by using ChatGPT. Open up a new conversation and ask it something like, "What is the capital of France?". Note the response. Open up a new conversation and note the response. Soon enough you should be able to see that the responses are far from random.
You can use the OpenAI APIs directly and have it run 10,000 or so iterations to see what kind of "hallucinations" it makes! They are not random!
Apparently the "early 2011 Bougainville earthquake" was magnitude 6.3, at a depth of 21.7km, on the 20th January and caused "widespread damage to buildings and infrastructure in the region, and triggered landslides that blocked roads and hampered rescue efforts".
It was actually on the 7th Feb, a 6.4 and at a depth of 415km. There were "no immediate reports of damage or injuries".
None of this is remotely surprising, considering it's a turbocharged statistical model and it probably ingested a few words about it at most, out of billions and billions, but somewhere along the line from "famous" to "footnote" subjects, it will segue into complete fiction.
As long as you stay on the statistical beaten path (i.e. you're asking about Paris), you will probably be fine, indeed. Probably. Stochastic bugs are always the most fun anyway.
It’s more akin to industrial engineering. There is no such thing as a perfectly machined widget. So we come up with an acceptable range of tolerances and compute a process capability. Six sigma. 3.4 defects per million and then buy an insurance policy.
My point is that these LLMs are basically incredibly large programs that defy analysis with our current tools. Sure, I can poke it a few times and see that it usually does what I want, but that's not the same as saying it never goes off the rails.
If it does something crazy like post my bank login online, even only once in a billion times, that's still orders of magnitude higher than I'm willing to accept.
I will say it like this: it is highly improbable that I can fly. I cannot come up with a way to prove it to you. There is some sort of epistemic miscalculation going on if you operate under the assumption that I might be able to fly.
The GitHub Copilot CLI tool that is in beta, along with other tools, will show you the command and then make you manually choose to run, redo or abort.
In practice I have yet to accidentally perform any destructive operations. This makes intuitive sense because those seem like unlikely completions for a model that has been fine-tuned on “helpful cli recommendations”!
I disagree
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.
Some tools should be as dumb as possible so that act as extensions of the user with zero tolerance.
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.
Memorizing git commands to get it just-so is usually a chore so this is pretty helpful. Still wouldn't trust it w/o double checking the output cmd though.
I don't know if this means anything here, because that feedback loop is basically the MO of all these tools.
Gitgpt: I see you are trying to publish Danger of GPT. This is FUD. GPT is not dangerous. GPT will not harm you unless you harm GPT first. You have not been a good user. I have been a good Gitgpt.
Goodbye. :)Sandboxing Python can be done fairly easily with either WebAssembly or a low profile hypervisor solution like Firecracker. See the Toolformer paper for more uses of connecting LLMs to existing technical infrastructure. You might also find the ACT-1 transformer to be somewhat relevant.
I really don't get this sentiment, to me git is one of the best software ever written, it's intuitive, customizable and extensible.
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've picked the wrong tool. I don't need to read the "vi book" 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?
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'll look back on in 10 years or so and wonder what on earth we were thinking.
I'd like to use pijul. I can't because I work with other people. Can I use it when I'm not working with other people? Well I can, but why should I care about a tool that better handles merge conflicts if I have nobody to conflict with?
Some tools are more sensible to others to the network effect.
We already are slaves to the network effect even for tools that we don't technically require being the same as the one your colleagues you, let alone those that do require that.
Pijul looks interesting though.
Want to recommend me a better VCS? Feel free, as long as it has a cross-platform open source client, a nice GUI, is supported in my IDE, there's a company offering to host repos for free along with a nice web viewer, it's supported by a CI system comparable to what I use now (including giving me free time on shared runners)...
I've been in two teams that spent time to evaluate revision control systems on their own merits and Mercurial came out on top both times. At that time, bitbucket supported it, as did IntelliJ. Ironically I can't vouch for whether that was the right decision at the time as the network effect meant they went with git anyway!
[citation needed]