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).
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!
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.
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).
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 …