jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.34k stars 1.83k forks source link

Deleted remotes are still listed despite not being present in local .git folder #4010

Open IceSentry opened 11 hours ago

IceSentry commented 11 hours ago

Describe the bug When looking at the remotes list, it shows a lot of remotes that I have deleted. When looking at .git/refs/remotes the deleted remotes are indeed not present so I don't know why it lists all those remotes.

To Reproduce I'm not entirely sure of an easy way to reproduce this. I'm trying to transition from gitkraken to lazygit and the remotes were deleted using gitkraken so I'm not sure what the exact steps would be.

Expected behavior Shows only the list of remotes that still exist locally.

Screenshots left-side is the .git/refs/remotes folder and right-side is the lazygit remotes view

image

All the remotes with 0 branches are remotes that I deleted over many years. I tried using the delete function of lazygit but all I get is an error saying the remote doesn't exist.

image

Version info: lazygit: commit=611fabde11d24d9acc71ee26077b9a1101f59f27, build date=2024-09-18T10:56:10Z, build source=binaryRelease, version=0.44.1, os=windows, arch=amd64, git version=2.38.1.windows.1

git version 2.38.1.windows.1

mark2185 commented 8 hours ago

Out of curiosity, what does git remote -v list?

IceSentry commented 8 hours ago

image

So only the ones in the .git folder

I'm honestly not sure where lazygit even got those from