Skip to content

Conversation

@scorphus
Copy link
Collaborator

Add a new rule to delete the currently checked out branch, if so desired:

$ git checkout -b foo
Switched to a new branch 'foo'
$ git branch -d foo
error: Cannot delete branch 'foo' checked out at '/Users/scorphus/Workspace/thefuck'
$ fuck
git checkout master; and git branch -D foo [enter/↑/↓/ctrl+c]
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
Deleted branch foo (was 34872f1).

@nvbn
Copy link
Owner

nvbn commented Oct 22, 2019

Looks good, thanks!

@nvbn nvbn merged commit 80cfd69 into nvbn:master Oct 22, 2019
@scorphus scorphus deleted the branch-del-checked branch October 23, 2019 09:21
riley-martine pushed a commit to riley-martine/thefuck that referenced this pull request Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants