Skip to content

git delete-branch deleted wrong branch #638

@hallzy

Description

@hallzy
$ git delete-branch test
Deleted branch test (was e76dbe9).
error: remote-tracking branch './test' not found.
To .
 - [deleted]         work

As you can see above, I wanted to delete my test branch which I created with:

git checkout --track -b test

After running that command I went back to master branch and did the git delete-branch test as above. I Believe that because I did not create a remote it must have confused it somehow.

Luckily, I was able to retrieve my stuff back from my work branch though, so that is good at least.

I realize now that what I was doing doesn't really make any sense, but I still feel like it probably shouldn't and gone to delete a completely different branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions