diff --git a/pre_commit/git.py b/pre_commit/git.py
index 796a0b8..1f16b6e 100644
--- a/pre_commit/git.py
+++ b/pre_commit/git.py
@@ -69,7 +69,11 @@ def get_conflicted_files():
 
 @memoize_by_cwd
 def get_staged_files():
-    return cmd_output('git', 'diff', '--staged', '--name-only')[1].splitlines()
+    return cmd_output(
+        'git', 'diff', '--staged', '--name-only',
+        # Everything except for D
+        '--diff-filter=ACMRTUXB'
+    )[1].splitlines()
 
 
 @memoize_by_cwd

Newly gitignored (but file still exists) files are linted
(they should not be)
diff --git a/tests/git_test.py b/tests/git_test.py
index c4e0145..701d36b 100644
--- a/tests/git_test.py
+++ b/tests/git_test.py
@@ -33,6 +33,16 @@ def test_get_root_not_git_dir(tempdir_factory):
             git.get_root()
 
 
+def test_get_staged_files_deleted(tempdir_factory):
+    path = git_dir(tempdir_factory)
+    with cwd(path):
+        open('test', 'a').close()
+        cmd_output('git', 'add', 'test')
+        cmd_output('git', 'commit', '-m', 'foo', '--allow-empty')
+        cmd_output('git', 'rm', '--cached', 'test')
+        assert git.get_staged_files() == []
+
+
 def test_is_not_in_merge_conflict(tempdir_factory):
     path = git_dir(tempdir_factory)
     with cwd(path):

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.9
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aspy.yaml==1.3.0
attrs==25.3.0
cached-property==2.0.1
coverage==7.8.0
distlib==0.3.9
exceptiongroup==1.2.2
filelock==3.18.0
flake8==7.2.0
iniconfig==2.1.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
mccabe==0.7.0
mock==5.2.0
nodeenv==1.9.1
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
-e git+https://github.com/pre-commit/pre-commit.git@6654fee5f9c40b4483f30d44a5ccda70b238b3ce#egg=pre_commit
pycodestyle==2.13.0
pyflakes==3.3.1
pyterminalsize==0.1.0
pytest==8.3.5
PyYAML==6.0.2
referencing==0.36.2
rpds-py==0.24.0
tomli==2.2.1
typing_extensions==4.13.0
virtualenv==20.29.3

name: pre-commit
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aspy-yaml==1.3.0
      - attrs==25.3.0
      - cached-property==2.0.1
      - coverage==7.8.0
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - flake8==7.2.0
      - iniconfig==2.1.0
      - jsonschema==4.23.0
      - jsonschema-specifications==2024.10.1
      - mccabe==0.7.0
      - mock==5.2.0
      - nodeenv==1.9.1
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
      - pyterminalsize==0.1.0
      - pytest==8.3.5
      - pyyaml==6.0.2
      - referencing==0.36.2
      - rpds-py==0.24.0
      - setuptools==18.4
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - virtualenv==20.29.3
prefix: /opt/conda/envs/pre-commit

tests/git_test.py::test_get_staged_files_deleted
tests/git_test.py::test_get_root_at_root tests/git_test.py::test_get_root_deeper tests/git_test.py::test_get_root_not_git_dir tests/git_test.py::test_is_not_in_merge_conflict tests/git_test.py::test_get_files_matching_base tests/git_test.py::test_get_files_matching_total_match tests/git_test.py::test_does_search_instead_of_match tests/git_test.py::test_does_not_include_deleted_fileS tests/git_test.py::test_exclude_removes_files tests/git_test.py::test_parse_merge_msg_for_conflicts[Merge
pre_commit/git.py
pre_commit/git.py