George George - 11 months ago 78
Git Question

`git status` shows worktree folders

I have created a worktree in my git project (feature of git >= 2.5). It resides in a sub folder of the root project folder and is called


Now when I issue
git status
from within the root project folder the worktree folder is shown among other untracked files as
untracked file

Isn't it supposed the worktree folders not to be shown in git status?

Or I do have to specify them explicitly in

Answer Source

Git Worktree works by creating a new subfolder which acts like a new branch. This folder contains, among other things, a .git file for the worktree branch. When you type git status the worktree folder shows up under untracked files. This makes sense, because from the point of view of your current branch, the worktree is just a bystander with no direct influence.

Untracked files will not prevent you from doing any work (push, pull, etc.) on your current main branch.