On Thu, Nov 07, 2019 at 10:34:32PM +0100, Ingo Wolf wrote: > is there a readonly / no checkout flag in the git configs? > > I use Git to trace / Backup some worktrees and would like to prevent > changing them accidentally with git. There's so-called "sparse checkout" feature in Git: it allows the user to designate parts of the work tree hierarchy as uninteresting, and Git won't touch them unless told otherwise. Please refer to the section "SPARSE CHECKOUT" in the git-read-tree manual page (run `git help read-tree`). To cite the git-checkout manual page: | --ignore-skip-worktree-bits | In sparse checkout mode, git checkout -- <paths> would update only | entries matched by <paths> and sparse patterns in | $GIT_DIR/info/sparse-checkout. This option ignores the sparse patterns | and adds back any files in <paths>.