# Python cache removal and ignore checks

$ git show HEAD:website/shots/__pycache__/derive.cpython-314.pyc | sha256sum
69b3fef991d07dd5a36545b16d80142ff6e0ee4ef0e3c54d1304d4f7dd561ffd  -
[exit 0]

$ git rm -- website/shots/__pycache__/derive.cpython-314.pyc
rm 'website/shots/__pycache__/derive.cpython-314.pyc'
[exit 0; executed before capturing this log]

$ git ls-files '*.pyc' '*.pyo' '*.pyd'
[exit 0; empty output expected]

$ git check-ignore -v --no-index __pycache__/example.pyc
.gitignore:21:__pycache__/	__pycache__/example.pyc
[exit 0]

$ git check-ignore -v --no-index website/shots/__pycache__/example.pyc
.gitignore:21:__pycache__/	website/shots/__pycache__/example.pyc
[exit 0]

$ git check-ignore -v --no-index example.pyo example.pyd
.gitignore:22:*.py[cod]	example.pyo
.gitignore:22:*.py[cod]	example.pyd
[exit 0]

$ sha256sum website/shots/derive.py
050af16dae260d0147973911878ec810dec3289dd6524644fd2cadde6ada25f6  website/shots/derive.py
[exit 0]

$ git rev-parse HEAD:website/shots/derive.py && git hash-object website/shots/derive.py
9d4216fa44b16a546fbadd5a6c3cbe1f4a6445dc
9d4216fa44b16a546fbadd5a6c3cbe1f4a6445dc
[exit 0; equal object IDs expected]

$ git diff HEAD -- website/shots/derive.py
[exit 0; empty output expected]

$ git diff --diff-filter=D --name-only HEAD
web/README.md
website/shots/__pycache__/derive.cpython-314.pyc
[exit 0]

$ git diff --cached --diff-filter=D --name-only
website/shots/__pycache__/derive.cpython-314.pyc
[exit 0]

$ git status --short -- .gitignore website/shots/derive.py website/shots/__pycache__/derive.cpython-314.pyc
 M .gitignore
D  website/shots/__pycache__/derive.cpython-314.pyc
[exit 0]

# Final deletion-filter clarification
$ git diff --diff-filter=D --name-only
[exit 0; empty because the assigned deletion is staged]

$ git diff --cached --diff-filter=D --name-only
website/shots/__pycache__/derive.cpython-314.pyc
[exit 0]

$ git diff --diff-filter=D --name-only HEAD
web/README.md
website/shots/__pycache__/derive.cpython-314.pyc
[exit 0; web/README.md is a parallel RM move, not modified by this executor]
