jesseduffield / jesseduffield/lazygit
Allow deleting local branch even if no remote exists
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Is your feature request related to a problem? Please describe.**
Currently, when using the "Delete local and remote branch" option, if the branch has no remote counterpart, LazyGit shows a warning and refuses to proceed. This can be inconvenient when working with local branches only — especially in workflows where branches are temporary or not always pushed to remote.
**Describe the solution you'd like**
If the selected branch has no remote, LazyGit should still allow deleting the local branch without showing a warning or error. Ideally, it would just skip the remote part and continue with deleting the local branch silently.
**Describe alternatives you've considered**
Manually switching to "delete local branch" instead, but this adds friction and defeats the purpose of the "delete both" shortcut.
**Additional context**
This would help make the UX more fluid for users who often work with local branches only or in detached workflows.
Similar feature for branches was recently implemented #4203
Contributor guide
Assessment
This issue has not been assessed yet.