7 ms·
Show HN: Gitgpt – Natural Language Git
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.
- jefurii 4y agoI'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 4y agoAbsolutely wasted opportunity. You could have called it "Chat GitPT"
- tempodox 4y agoI feel like we have reached the “solution in search of a problem” stage.
- tuukkah 4y agoThe prompt is to the point: prompt = "Provide only the appropriate git commands for:" + prompt https://github.com/Hesse/gitgpt/blob/9c78e40d5ebdefdf0a4a8297d2f88b5a8d82ffad/main.go#L44 https://github.com/Hesse/gitgpt/blob/9c78e40d5ebdefdf0a4a829...
- karxxm 4y agoThe basis of 80% of all newly appearing „AI“ projects/startups
- phneutral26 4y agoI 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. You get the gist.
- danthelion 4y agogit-genie does this with the —explain flag! https://github.com/danthelion/git-genie https://github.com/danthelion/git-genie Also GPT-based
- gdcbe 4y agoNot sure what value it adds though. Isn’t it easier to type the cmds then to write all that? 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 …
- lolinder 4y agoThe thing I'm most excited for for technology like this is making voice control more feasible for more things. If you plugged a speech to text engine in front of this it could be quite useful.
- gdcbe 4y agoTrue. Very true, nice use case indeed! Thanks for pointing that out!
- onion2k 4y agoIsn’t it easier to type the cmds then to write all that? Obviously it is if you know them.
- PaulDavisThe1st 4y ago"gitgpt make me a sandwich" isn't going anywhere fast. Understanding what you can tell gitgpt to do is extremely adjacent to knowing actual git commands.
- deleted 4y ago[deleted]
- yodon 4y agoI've been waiting for someone to build this. My hope is it will simplify recovering from the myriad forms of "I just did something I didn't want" that occasionally happen with git (and that I've historically used [0] to resolve) [0]https://sethrobertson.github.io/GitFixUm/fixup.html https://sethrobertson.github.io/GitFixUm/fixup.html
- ilaksh 4y agoThis 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: https://github.com/runvc/askleo https://github.com/runvc/askleo There are other ones of course.
- deleted 4y ago[deleted]
- KMnO4 4y agoI’m just curious, why does everyone use DaVinci for these sorta applications? Even the 2nd best model (Curie) is 10x cheaper and I’m sure would perform nearly as well.
- EForEndeavour 4y agoI imagine it's a mix of: 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
- mellosouls 4y ago404, check your url
- KMnO4 4y agoLooks like a typo; this should work: https://github.com/runvnc/askleo https://github.com/runvnc/askleo
- SparkyMcUnicorn 4y agoNice! I don't intend to discount the work you'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's pretty polished and has performed well for me so far. It is on a waitlist, but I got accepted after a couple weeks. https://githubnext.com/projects/copilot-cli/ https://githubnext.com/projects/copilot-cli/
- hn_throwaway_99 4y agoThis is very cool. I feel like this should be an eventual good replacement for essentially all man/help pages.
- AlexAltea 4y agoThat looks cool, though I'd be very concerned about the possibility about ChatGPT "hallucinating" a `rm -rf /` or equivalent.
- brokencode 4y agoJust run all the git commands by another GPT bot that determines whether it would be harmful first. GPT bots all the way down.
- saghm 4y agoGiven that it is doing actual operations under the hood, it would be interesting to have it just output the "native" command for the operation rather than executing it. People could write wrappers around that output to execute it after prompting the user for confirmation or something like that so that users would have the choice to "opt into" the level of automatic execution they're comfortable with.
- danthelion 4y agoThis way my approach when I created a similar tool, called git-genie[0]. It’s more of an educational tool first, explains the generared git command in detail. [0] https://github.com/danthelion/git-genie https://github.com/danthelion/git-genie
- williamcotton 4y ago[flagged]
- basicallydan 4y ago> Interfacing with git sucks I disagree
- jastanton 4y agoI'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've done this directly in the ChatGPT UI with some small changes and it produces some great messages... 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.
- tuukkah 4y agoCommitGPT was in a Show HN but didn't gather much attention back then: https://github.com/RomanHotsiy/commitgpt https://github.com/RomanHotsiy/commitgpt
- notShabu 4y agoIt's pretty useful as a lookup, but these tools are similar to a knife that auto-magically orients itself to help with cutting. 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.
- netr0ute 4y ago> 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. I don't know if this means anything here, because that feedback loop is basically the MO of all these tools.
- oefrha 4y agoUser: Commit and push danger-of-gpt.md 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. git reset --hard master git branch -m old-master git checkout --orphan master git clean -fdx git commit --allow-empty -m 'Initial commit' git push -f origin master git branch -D old-master git reflog expire --expire=now --all git gc --aggressive --prune=now Goodbye. :)
- gl-prod 4y agoGPT isn't AGI.
- blatant303 4y agoWell I'm wondering. It seems mastering linguistic inputs does give you access to some kind of generality.
- franga2000 4y ago
- whoomp12342 4y agothanks, I hate it.
- antibasilisk 4y agolet's not give language models unrestricted access to our shells please. This is like allowing remote code execution from an insane person.
- visarga 4y agoI was recently thinking of a backend for code execution for LLMs. It's hard to run Python safely in a box. For the moment the idea is shelved.
- KRAKRISMOTT 4y ago> I was recently thinking of a backend for code execution for LLMs. It's hard to run Python safely in a box. 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.
- dudus 4y agoI think this is a cool idea but why stop at git? Why not expand to any CLI program. Maybe someone already did that.
- str3wer 4y agobecause it's dangerously stupid to let an AI hallucinate commands on your cli that could potentially destroy your files or system
- eurasiantiger 4y agoCan it fix merge conflicts?
- la64710 4y agoAll these tools need openAI keys … give me one model that is self hosted with an API endpoint …
- visarga 4y agoBut ... 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.
- kaetemi 4y agoActually, an AI assisted magic merge conflict fixer would be neat. (Compared to coworker just overwrote all conflicts with their own changes.)
- hyperthesis 4y agoc++gpt
- nathias 4y ago> Interfacing with git sucks. I really don't get this sentiment, to me git is one of the best software ever written, it's intuitive, customizable and extensible.
- midenginedcoupe 4y agoOr 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's needs. 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.
- ithkuil 4y agoThe network effect is so huge it trumps on everything else. 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.
- midenginedcoupe 4y agoSure. The network effect explains why it's the defacto standard now, but not necessarily how it got there. And, ironically, I use git for all my projects for exactly the same reasons. Pijul looks interesting though.
- franga2000 4y agoSimple: it's because it's the most widely supported system. 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)...
- junon 4y ago> Interfacing with git sucks [citation needed]