Commit, push and undo
My changes stay in your folder until you decide. Commit them, push them, or put everything back exactly as it was.
On this page
When I finish a change, it sits in your folder as ordinary edits. Nothing is committed and nothing is pushed until you say so.
Look first:
/diff
Commit#
/commit
/commit fix: clamp partial refunds
/commit --branch refunds fix: clamp partial refunds
/commit --branch refunds --new
Or just say it: "commit this on a new branch called refunds".
| You give | I do |
|---|---|
| No branch | I create a new branch named after the work (ysra/…) and commit there |
--branch name, and it doesn't exist |
I create it and commit there |
--branch name, and it exists |
I add my commit to it without switching your folder. If my changes conflict with that branch, I stop, name the files, and write nothing |
--new |
The branch must be new. If the name is taken, I stop instead of reusing it |
What a commit contains:
- only the files I changed. Your own uncommitted work stays uncommitted, right where it is;
- your hooks run as usual. I never skip them.
/commit never pushes.
Committing onto an existing branch, then the question before a push
Push#
/push
/push --branch refunds
/push commits (same rules as above) and then pushes. I ask before the push,
every time, auto mode included, and tell you the remote and branch.
- I only push a branch I created or committed onto in this conversation.
- Never forced. If the remote has moved ahead, the push is rejected and I tell you. I don't overwrite anything.
Your CI, read back#
After a push, I watch your repository's own checks and report in the conversation:
Your CI passed on ysra/partial-refunds (4 checks green).
Your CI failed on ysra/partial-refunds: test. Want me to look into it?
I read it with tools you already have signed in: gh for GitHub, glab for
GitLab. I only read. If neither is installed or signed in, I say that I can't
see your CI from here.
Undo#
/undo
/undo puts back exactly the files my last finished task changed:
- a file I edited goes back to what it was before I started;
- a file I created is removed;
- your own changes stay.
Undo asks first
I ask before doing it. I refuse, and say why, when:
- you've edited those files since. I won't overwrite your work;
- the changes are already committed. Undoing a commit means a new commit that reverts it, never rewriting history. Ask me for that instead;
- I'm still working. Use
/cancelfirst.
To go further back, /checkpoints lists earlier points in the conversation and
/rewind SEQ restores one.
What I never do in your Git#
No matter how I'm asked:
- no force push;
- no deleting branches, tags or stashes;
- no
reset --hard,clean,rebase, or amending your commits; - no checking out over your uncommitted changes;
- no Git change you didn't ask for in this conversation.
I track my own work separately, outside your folder, so your history is never touched to make undo and diff possible.

