git-clean-worktree
Commit local changes so git status is clean. Do not push. Do not open a PR.
Triggers
- "Please commit all changes so we have a clean worktree"
- "haave a clean worktree"
- "thank you, please commit all changes."
Steps
- Run
git statusandgit diffin the worktree the user is in. - Stage the changes that belong to the current work. Do not add secrets,
.env, private keys, or unrelated files. - Write a commit message that names the change. Use the user's words when they gave a subject.
- Commit. Stop. Show
git statusas clean (or list leftover untracked files you refused to add). - Do not
git push. Do notgit pull --rebaseunless the user asked. Do not amend a pushed commit.