docs/tutorials/ask-for-git-without-running-it
Beginner6 min

Ask for git without running it

Recall prints git log, stash, and undo suggestions. You paste them into your own terminal. Ask never executes.

What you will do

Three Asks. Each session below is a simulation of what the CLI prints. Copy the green command into git yourself. Do not use recall run until you have saved a command you trust.

01See recent commits

simulated — nothing here is executed.
$ recall "show the last 20 git commits"  git log --oneline -20 Prints the last 20 commits as one line each so you can scan hashes and messages.  shell: zsh risk: SAFE source: recall agent ai left this month: 19  Ask mode does not run commands. Copy or save this yourself. ? Save this command? No

Paste that into the repo. Git runs in your shell, not inside recall.

you run this
git log --oneline -20

02Stash dirty work

simulated — nothing here is executed.
$ recall "stash my uncommitted changes including untracked files"  git stash push -u -m 'wip' Shelves tracked and untracked files. Your working tree becomes clean.  shell: zsh risk: SAFE source: recall agent ai left this month: 18  alt git stash -u  Ask mode does not run commands. Copy or save this yourself. ? Save this command? No

03Undo the last commit, keep files

simulated — nothing here is executed.
$ recall "undo the last commit but keep my files"  git reset --soft HEAD~1 Moves HEAD back one commit and leaves the index and files as they were.  shell: zsh risk: CAUTION source: recall agent ai left this month: 17  Ask mode does not run commands. Copy or save this yourself. ? Save this command? No

Risk is CAUTION because reset rewrites branch history. Read it, then paste it only if that is what you want. Ask will not run it for you.

04Save the one you reuse

simulated — nothing here is executed.
$ recall "undo the last commit but keep my files"  git reset --soft HEAD~1 Moves HEAD back one commit and leaves the index and files as they were.  shell: zsh risk: CAUTION source: recall agent ai left this month: 17  Ask mode does not run commands. Copy or save this yourself. ? Save this command? Yes? Name (optional): undo-soft? Tags (optional): git Saved as "undo-soft" [git].

Next time, recall "undo the last commit keep files" can return from your vault.

// what's next
Ask for React / Vite start and test commands Ask for Docker and port-conflict commands