# Fix git panel not updating after commit \(\#47222\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/48f712b49bcb2265b61474305697f73b225027d6)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 48f712b49bcb2265b61474305697f73b225027d6

Requested commit: 48f712b49bcb2265b61474305697f73b225027d6

Commit: 48f712b49bcb2265b61474305697f73b225027d6

Tree: ba3e063ce9b30c19eb412d74d65ffed8ddaf59ba

Author: feeiyu

Committer: GitHub

## Message

```
Fix git panel not updating after commit (#47222)

Fixed git panel not update after commit or switch branch on Linux.

On macOS and Windows, the watcher implementation recursively watches
subdirectories.
On Linux, the watcher is non-recursive.

In Git worktree scenarios, only `<project>/.git` is watched, but the
actual worktree Git directory
`<project>/.git/worktrees/<worktree>`  is not.
Therefore, Git operations such as commits or branch switches inside a
worktree do not emit watcher events on Linux, causing the Git panel to
stay out of sync.

Release Notes:
- Fixed git panel not update after commit or switch branch on Linux with
git worktrees.
```

## Parents

- [d6eda52b322215b3947d9a9d9c01a4472fdef4dc](https://git.cafe/gitcafe/zed/commit/d6eda52b322215b3947d9a9d9c01a4472fdef4dc?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/48f712b49bcb2265b61474305697f73b225027d6?format=markdown)
