promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Aider

/commit

Commits changes to the repo that were made outside the chat.

/commit creates a commit for all dirty (uncommitted) changes in the repo, with a commit message generated by Aider. A custom commit message can optionally be given as an argument. Changes Aider makes itself are already committed automatically after every edit, per the docs.

โœ… WHEN TO USE IT?

Save manual changes made outside Aider

/commit โ€” after editing something yourself outside Aider, before letting it keep working in the same repo

Supply your own commit message

/commit fix: correct off-by-one error in pagination

โ›” WHEN NOT TO?

Wanting to commit Aider's own code changes

Aider already auto-commits its own edits after every change by default, so an extra /commit isn't needed for that.

Better: Only set --no-auto-commits if you deliberately want to turn off automatic committing

Wanting to undo a bad commit

/commit creates new commits, it doesn't undo anything.

Better: Use /undo to revert the last commit Aider made

SOURCES