-
Notifications
You must be signed in to change notification settings - Fork 268
Option to delete only not merged branches #785
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
Conversation
- The confirmation panel to delete a branch itself is a reminder of this operation, the user needs to check and confirm, then click
OK
to start this operation. - You can toggle
Enable --prune on fetch
from repository setting dialog.
I found the Enable --prune on fetch,
thanks!
I don't fully agree that the confirmation panel is enough. How should I be sure that there are no pending changes? I would have to see if I pushed everything manually (one branch at a time). The -D option can cause changes to be lost, while the -d should be pretty safe and almost always do the job.
The problem I am trying to solve is cleaning up local folders that were merged. No git client has a great solution for this. Some at least notify you about the state of the branch (1. not-tracked 2. tracked 3. tracked but the origin branch has been deleted). This allows you to delete category 3 without risking deleting category 1.
I would like to add the track status to this panel if the target branch is local branch and has valid upstream and their HEAD is different. For example:
I would like to add the track status to this panel if the target branch is local branch and has valid upstream and their HEAD is different. For example:
That looks great. Then it should also go into the multi-delete dialog and the Local Branches list.
image
I'll close this issue since it is not necessary.
@love-linger I don't mind. I find it surprising that all git clients have git branch -d
as default since it's the safer one. I think you should reconsider at least that.
I do not think so.
Fork
, GitKraken
and JetBrains IDEs
use -D
or --delete --force
to delete a local branch. Even the JetBrains IDE
doesn't require the user to confirm the operation again.
I am, obviously, not an expert so I won't argue. SourceTree (which resembles SourceGit the most) has -d as the default.
JetBrains Rider has a post notification with a rollback feature
image
As a user, I would like to ensure I don't delete not merged branches accidentally. This is also helpful when cleaning up local branches.
On additional change would be helpful here to add --prune in the fetch option. I can add that separately.