jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.67k stars 1.84k forks source link

Detect deleted remote branches #1896

Closed sobotkami closed 2 years ago

sobotkami commented 2 years ago

Is your feature request related to a problem? Please describe. If I review merge requests, I have to download the branch locally. The remote branch is then merged and deleted. However, I often forget to delete the local copy. And this causes me to accumulate branches that no longer have a remote one.

Describe the solution you'd like Wanted to be able to somehow verify which branches have a no longer existing remote branch.

Describe alternatives you've considered I've seen this feature in the https://git-fork.com/ application where a small icon appears at the end of the line next to the branch name, indicating that this branch no longer has a remote counterpart.

jesseduffield commented 2 years ago

Pretty sure we already have this on the master branch.

mark2185 commented 2 years ago

@sobotkami as Jesse suggested, have you tried building master? If it's solved, feel free to close the issue :)

sobotkami commented 2 years ago

I can confirm this - just tried the master: "(upstream gone)". Btw is there any key binding to prune the remote branches?

mark2185 commented 2 years ago

If you mean to prune the local branches that have been tracking a remote branch that is deleted, there isn't a mapping for that.

You could add a custom command, that's what I do, e.g.

customCommands:
  - key: 'F'
    command: 'git fetch --prune'
    context: 'localBranches'
    stream: true

More info can be found here - the docs.

sobotkami commented 2 years ago

Aha, cool, good to know! Thanks!

radekcep commented 2 months ago

What do I need to do to see the "Upstream gone" status? It's not updated after fetching remote. But it appears once I open another git client.