You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a branch is not fully merged, branch deletion is impossible within Git Commander.
Consider the following repo:
❯ mkdir git-repo
❯ cd git-repo
❯ git init
Initialized empty Git repository in~/git-repo/.git/
❯ git checkout -b main
Switched to a new branch 'main'
❯ touch initial-commit
❯ git add --all
❯ git commit -m "Initial commit"
[main (root-commit) 431a8c2] Initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 initial-commit
❯ git branch
* main
❯ git checkout -b tmp
Switched to a new branch 'tmp'
❯ touch branch-file
❯ git add --all
❯ git commit -m "Branch commit"
[tmp 49ef858] Branch commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 branch-file
❯ git checkout main
Switched to branch 'main'
The resultant Git repo looks like this:
* tmp
/
* main
Trying to delete the branch results in an error, because the branch is not yet fully merged:
❯ git branch --delete tmp
error: The branch 'tmp' is not fully merged.
If you are sure you want to delete it, run 'git branch -D tmp'.
❯ git branch
* main
tmp
In order to delete the unmerged branch, one must do a force delete:
Git Commander does not allow for force deletion of branches. In the event that the user is requesting the deletion of a non-fully merged branch, Git Commander should provide a confirmation dialog stating that the branch is not fully merged. If the user cancels from the dialog, the deletion should do nothing (as it does today), but if the user confirms from the dialog, the deletion attempt should be re-executed forcefully (i.e. with the --force flag).
The text was updated successfully, but these errors were encountered:
When a branch is not fully merged, branch deletion is impossible within Git Commander.
Consider the following repo:
The resultant Git repo looks like this:
Trying to delete the branch results in an error, because the branch is not yet fully merged:
In order to delete the unmerged branch, one must do a force delete:
Git Commander does not allow for force deletion of branches. In the event that the user is requesting the deletion of a non-fully merged branch, Git Commander should provide a confirmation dialog stating that the branch is not fully merged. If the user cancels from the dialog, the deletion should do nothing (as it does today), but if the user confirms from the dialog, the deletion attempt should be re-executed forcefully (i.e. with the
--force
flag).The text was updated successfully, but these errors were encountered: