Folder names are C-quoted as bytes on git’s standard input, so literal quotes and backslashes keep their meaning. Windows refuses reserved device names, including names with extensions, before checkout.
The picker reads git’s actual sparse state each time it opens. If it differs from the saved choice, Apply saved folders or Keep current folders resolves it explicitly. Non-cone patterns say “set outside the app” and are left alone. Changes and archive recheck the state; archive refuses unresolved differences or non-cone patterns rather than losing them on restore. Import records an existing cone. An interrupted checkout reapplies the saved cone even with an existing index. Copies of local files use the original path bytes, including non-UTF-8 names on filesystems that support them.
A pull request with selected folders is fetched through the base repository’s PR ref, including a fork’s head, and checked out under the cone from the start. The base repository and host come from the PR address GitHub returned. The app fetches through a matching configured remote, so a project’s upstream is used even when origin is a fork; no match refuses checkout. Fork remotes stay on that verified host and use the base remote’s transport, including HTTPS, SSH ports and verified SSH aliases on GitHub Enterprise. It does not use gh pr checkout. The branch still tracks the pull request’s source repository, so Push goes to the fork when appropriate. A local branch with different work is refused instead of reset.
Reverting a checkpoint keeps the current cone, including a root-only checkout. Excluded folders stay absent while the visible files are restored.
Folder browsing and selection stop git while reading if a level exceeds 100,000 entries or the request exceeds 16 MiB of tree listings. Each tree is read once per request; a partial list is never used.
Before changing the folders, the app checks every tracked folder outside the new choice for untracked and ignored files, including local .env files recreated in a folder already left out. It refuses with up to 20 paths before running the cone update. Chats, scripts and terminals must stop first; new starts and linked-folder grants wait until the change ends. The writer check, local-file check and folder update take one turn in the same workspace queue as message checkpoints, so a message already starting waits for the update or prevents it.
How do I choose the folders?
In New workspace, Folders opens Select working directories. The list is the folders of the branch you are starting from, one level at a time, so a repository with tens of thousands of folders stays usable. Entire repository checks everything out, which is the choice when you leave the list alone. Turn that off and tick the folders you want. An empty choice shows only the files at the root of the repository.
The same button is on the workspace’s Changes tab, and it changes the choice for that workspace only. On git 2.32–2.34, you can change a selection made when the workspace was created. Narrowing an existing full checkout needs git 2.35 or newer; older versions cannot safely initialize it without risking ignored files in folders you keep.
Files at the root, and files that sit directly in a folder above one you chose, stay. A folder you did not choose is left out, including its own subfolders.
What does git do?
The worktree is created without writing files, the choice is applied with git’s sparse checkout in cone mode, and then the files are written. Folders you left out are never written to disk. The patterns belong to this worktree.
Using a choice makes git set extensions.worktreeConfig in the repository, so each worktree can keep its own sparse checkout. git config --list prints that key in lower case (extensions.worktreeconfig). Nothing else in the repository’s configuration is changed. The key stays after you return to the whole repository, which is how git leaves it.
A folder name is taken from the repository as git stores it. A name that contains a control character cannot be chosen, and the row says why. Names must also be writable on this computer. Git for Windows can refuse a revision with an invalid path even when that folder is left out of the choice.
What if a folder still has work in it?
Removing a folder that has uncommitted or untracked files is never forced. The choice stays as it was, and the picker shows what git kept and why. Commit or remove that work, then try again.
What else follows the choice?
The file tree, search, the changes list, files copied into a new workspace, the setup script, checkpoints, and archive and restore all see the worktree as git checked it out. A file in a folder you left out is not listed as deleted, and a checkpoint does not record it as deleted either.
Restore keeps the choice, including when a restore was interrupted before the files were written. Fork Workspace keeps the choice too, along with the uncommitted changes.
Checkpoints and Revert to here cover this workspace’s own folder. They do not reach a folder you left out, and they do not reach a linked workspace.