Skip to content

Allow deleting local branch even if no remote exists #4486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
codeNilson opened this issue Apr 15, 2025 · 3 comments
Open

Allow deleting local branch even if no remote exists #4486

codeNilson opened this issue Apr 15, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@codeNilson
Copy link

codeNilson commented Apr 15, 2025

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

@codeNilson codeNilson added the enhancement New feature or request label Apr 15, 2025
@stefanhaller
Copy link
Collaborator

I don't understand. Deleting a local branch is as simple as pressing d enter. Why do you want to press d b instead, and expect that to work?

@codeNilson
Copy link
Author

I don't understand. Deleting a local branch is as simple as pressing d enter. Why do you want to press d b instead, and expect that to work?

True, but the point of d + b is convenience — feels unnecessary to block it over a missing remote. Would be a simple, non-disruptive quality-of-life improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants