Skip to content
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

#N/A: Add new git_branch_delete_checked_out rule #985

Merged
merged 1 commit into from
Oct 22, 2019

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