8 ms·
Ask HN: Could somebody use GPT make Git super easy to use?
A lot of amazing thingss are being done with AI now.
Could someone train GPT to automate most of Git workflows and make the rest super easy?
I would think if you can use it to code an
entire whole application, it can do Git.
I would try it myself, but I have no idea how to use the various AI tools.
- eimrine 4y agoDo you think that talking to git like to a human will be easier than talking to git using git language? I would rather set AI in such a way to be able to describe any command I type.
- ThinkBeat 4y agoI would like to lift my interaction with git to a higher level of abstraction. Now this would be based in the context that the wonderful AI knew What client, what project, what tools, what team, what rules etc. knew the codebase, parsed and knew all the history, So the CLI: AI# Hey, check in my code. AI# >Ok. Which would contain in part: Hey commit my code, ensure that all files are up to date. Handle all conflicts and manual merges that may arise based on your knowledge of the entire code base and the code I have just written. Ensure to update whatever GitHub might need it. .. Ensure that all tests are run, ensure continuous integration runs. Do whatever it is this company / client / project wants to happen after a commit. docker update restart containers Trigger lambdas Release. Whatever "" AI# > I would like to let you know that checking in your code was successful and all issues have been handled by me and all routines and procedures have been completed with success. AI# > Would you like to play a nice game of chess? Ok. I am on it. I am checking your code and handling all the boring stuff. All mergers have been handled by me. All testes have returned positive.
- eimrine 4y agoYou don't even want AI to prove a correctness of understanding of your intention about editing your code. I would rather make AI to make a save/load of my interactions. For example, I need to do something complicated with versions of my code but I know I may fall down in dozens of ways. So I tell AI to remember the state then I do shit and I end up with one of two possible results. Either I do everything correctly or I fuck up. My idea is that all I really need, based of my experience with git, is some ability to easily un-fuckup without copy/pasting git folder on filesystem level. Maybe my approach fits better to some state-machine than to AI but tbh I do not think GPT is any decent help for writing code.
- turtleyacht 4y agoI think it's possible. Ask GPT to * Show the git command to set up a repo named "test," with placeholders for my username and password. * Show the git command to create a new branch, where it starts with story ID JIRA-1234. * Show the git command to stage and push my changes. * Show the gh command to create a pull request. * Show the git commands to switch to main and rebase my changes from branch X However, notice how GPT only provides the mechanism of execution. We still have to vet and run it ourselves. In the future, we'd probably want these: * Onboard me with dev creds * Pick a story off the backlog and create a PR using its description * Add me as a reviewer to your changes * Ask the team where to eat. Break ties. Voting ties, I mean. Some other interesting ones: * Break up this service into multiple microservices. * Create a test suite for the changes in this PR. * Convert this repo from Java to Rust. * Translate every hardcoded string in this repo to Thai. * Follow up with everyone still needing to approve all changes this week. * Suggest root-cause for the outage last week. Extra-domain questions would be nice: * What investment strategies will maximize my return this week? * How is the company doing financially? * Are folks happy to work here?
- johntiger1 4y agoYep, I'm building a commit generator using GPT: https://github.com/johntiger1/gpt-cli https://github.com/johntiger1/gpt-cli
- ThinkBeat 4y agoGreat thanks
- mitchellpkt 4y agoI haven't had a chance to test it personally, but I think this is a main premise of GitHub's Copilot CLI product. Quoting below from https://githubnext.com/projects/copilot-cli https://githubnext.com/projects/copilot-cli > Copilot for CLI provides three shell commands: `??`, `git?` and `gh?`: > `??` is meant as the general-purpose goto for arbitrary shell commands. It will compose commands and loops, and throw around obscure find flags to satisfy your query. > `git?` is used for searching specifically for git invocations. Compared to ?? it will be more powerful at generating Git commands, and your queries can be more succinct when you don't need to explain that you're in the context of Git. > `gh?` combines the power of the GitHub CLI command and query interface with the convenience of having AI generate the complicated flags and jq expressions for you.
- kingkongjaffa 4y agoIs there a word for “bad-pattern” when it comes to some applications that will make us dumber and lazier? On one hand git seems to be confusing and hard to grok. But on the other hand I think once you get it it helps to enforce good coding practices, small working commits, good commit msgs, helps to understand the codebase better. I think all of the side effects of git are better in my brain than having a slightly better abstraction layer to make git do more magic for me.
- neoncontrails 4y agoWith just a tiny sed find-and-replace (possibly generated by GPT) this sounds exactly like: What Assembly developers said about C; What C developers said about Java; What Java developers said about Python; It's interesting though, this cycle can't keep going perpetually. We're already within striking distance of translating natural language into code; lots of us incorporate it into our workflows already. Of course, natural language doesn't ever completely translate into code without leaving an enormous trail of ambiguities in its wake. But I find this process of iteratively "sculpting" the generative model's output totally riveting. The other day I plugged my ChatGPT plugin into the GPT-4 backend for the first time. I don't know how popular HBO's Westworld is in these parts, but I thought of it instantly because the coding session I found myself immersed in was shockingly close to the dialogic narrative-rendering computer Dolores uses to make deadly, immersive entertainment.
- Am4TIfIsER0ppos 4y agoWill it refuse to use the master branch because it's racist?