-1

I have a strange case:

  1. I created a copy of an existing branch with the name "test"

  2. I did some rebasing on it (only reordered some commits in interactive mode)

  3. There was only one conflict, which I solved

  4. And I completed rebase

  5. Now I want to delete that test branch and I get the following error:

    "error: Cannot delete branch 'test' checked out at 'C:/...FILEPATH..."

I tried those:

  1. git branch -d test
  2. git branch -D test
  3. git branch -d -f test
A.B.
  • 2,374
  • 3
  • 24
  • 40

1 Answers1

1

You cannot delete the branch you're currently using (as indicated by "Cannot delete branch 'test' checked out at"). Check out a different branch first, then try deleting test.

Jim Redmond
  • 4,139
  • 1
  • 14
  • 18