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.
* 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?
> 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.
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.