Make a First Aider Edit and Review Its Git Commit
Aider can make commits when it edits source in a Git repository. Start with a clean practice branch and a small case so you can see exactly what a model-generated commit changed.
Worked example
A one-file starter for reviewing an Aider edit
export function displayLabel(label) {
return label.trim();
}Steps
- In a throwaway Git repository, commit the sample as label.mjs and use a practice branch. Start Aider with a configured model and include label.mjs in the chat.
- Ask for a change that returns 'Unnamed' for a blank label while preserving title text for nonblank input. Request only that file and check Aider's /diff display and the Git log.
- Run a Node.js test for blank and nonblank labels. If Aider made the most recent commit and you want to practice rolling it back, run /undo in that session and verify the pre-edit behavior.
What to check
- Record the initial commit before editing. If automatic commits are disabled, review the ordinary working tree diff and do not assume /undo has an Aider commit to revert.
- Use Node.js or your own test framework to verify that ' Pine ' stays 'Pine' and a whitespace-only label now yields 'Unnamed'.