Git Internals and Plumbing/Mark skip-worktree

Tell Git to avoid touching a path in sparse-like workflows.

Section: Trees and Index Plumbing

Mark skip-worktree

bash
bash
git update-index --skip-worktree path/to/file

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Trees and Index Plumbing
List tracked files
Print index entries.
OpenIn sheetbashsame section
List staged index entries
Include mode, object ID, and stage number.
OpenIn sheetbashsame section
Mark file assume-unchanged
Hint that Git should skip stat checks for a path.
OpenIn sheetbashsame section
Read tree into index
Populate index from a tree-ish.
OpenIn sheetbashsame section
Write current index to tree
Create a tree object from the index.
OpenIn sheetbashsame section
Write blob object
Store file content as a blob and print its object ID.
OpenIn sheetbash1 tag match