git and github cli — the ai builder's actual workflow6 / 9
working tree, staging, commit — the model ai breaks first
AI ran git add . and ended up staging .env along with the real
source changes. The script below filters the staged list, but the
filter on line 4 keeps .env instead of removing it. Fix line 4 so
only files that DON'T start with .env are kept.
Expected output:
['src/auth.py', 'tests/test_auth.py']
The break is on line 4 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _