promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Aider

/git

Runs any git command; the output is excluded from the chat context.

/git runs a raw git command (e.g. /git log or /git branch) without its output becoming part of the chat context. The docs describe this as being for more complex git history management beyond the built-in /diff, /undo, and /commit commands.

โœ… WHEN TO USE IT?

Check git history or status directly from the chat

/git log --oneline -5 โ€” quickly review the last commits without leaving the chat

Run a more complex git operation not covered by the built-in commands

/git branch feature/checkout โ€” create a new branch while continuing to work in Aider

โ›” WHEN NOT TO?

Wanting the output to become context for the LLM

The docs say /git explicitly excludes its output from the chat context.

Better: Use /run instead, which offers to add its output to the chat

Just wanting to commit or undo Aider's own changes

There are dedicated, simpler commands for these standard cases.

Better: /commit to commit dirty changes, /undo to revert the last Aider commit

SOURCES