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.
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.
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. :)I don't know if this means anything here, because that feedback loop is basically the MO of all these tools.
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 …
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?
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).
Obviously it is if you know them.
Understanding what you can tell gitgpt to do is extremely adjacent to knowing actual git commands.
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!
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!
prompt = "Provide only the appropriate git commands for:" + prompt
https://github.com/Hesse/gitgpt/blob/9c78e40d5ebdefdf0a4a829...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.
It is on a waitlist, but I got accepted after a couple weeks.
$ gitgpt commit files with msg cleaning repo files and push
git commit -m msg
git clean -fdx
git push
Without `git-add`, 1st one is a NO-OP, 2nd is a destructive action, 3rd is a NO-OP. All vaguely related to the topic at hand, "hallucinating" such a destructive action seems at least plausible.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.
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
You get the gist.
Also GPT-based
I really don't get this sentiment, to me git is one of the best software ever written, it's intuitive, customizable and extensible.
[citation needed]
c++gpt