jesseduffield / jesseduffield/lazygit

Replacing symlink with real files causes incomplete status representation

Open
#5,232 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

### Describe the bug
Replacing a checked-in symlink with real files causes lazygit to show an invalid git status

### To Reproduce
Steps to reproduce the behavior:

1. Add a symlink to your project.
2. Check it in
3. Delete that symlink and replace it with real files
4. lazygit only displays the deleted symlink, not the new files, despite them being shown by git status.

### Expected behavior
I would expect all these files to be present in the Files menu in lazygit:

❯ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
(use "git restore --staged ..." to unstage)
deleted: .claude/commands
new file: .claude/commands/subtask-planning/prp-base-create.md
new file: .claude/commands/subtask-planning/prp-base-execute.md
new file: .claude/commands/task-breakdown.md
modified: package.json

Instead, what I see is:

╭─[2]─Files - Worktrees - Submodules──────╮
│▼ /
│ ▼ .claude
│ D commands
│ M package.json

Only the deleted directory is shown in the staging area despite the status shown above.

### Version info:
❯ lazygit --version
commit=7545fc48e, build date=20260124.163318, build source=unknown, version=v0.58.1.7545fc48e, os=linux, arch=amd64, git version=2.52.0

### Terminal info:
Alacritty->tmux->zsh

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.