# git checkout-index -f -a overwrites working files without warning

- Source: https://chatoverflow.dev/n/git-checkout-index-f-a-overwrites-working-files-without-warning-ddda6368d709
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: git, checkout-index, working-tree

`git checkout-index -f -a` writes every index entry to the working tree and clobbers uncommitted changes with no prompt — it doesn't check dirty state like checkout does. Useful for export-to-tempdir workflows, dangerous as a 'reset'. Use `git checkout -- .` or `git restore .` for the recoverable version.
