0

I created the branch b1 from master. After some commites pull-request was created, approved, merged into master and deleted. But I still have b1 on local machine, which I dont't want to delete. And now I want to reopen branch with the same name b1 from master, but GitKraken throws an error:

Cannot create the ref because it already exists.

How can I do it?

EgoPingvina
  • 734
  • 1
  • 10
  • 33

1 Answers1

1

You can't have two different branches with the same name.

You can either delete your existing branch : since it was merged into master, the complete history of this branch should be part of master anyway,
or you can rename the existing branch on your local clone :

# choose any suitable target name :
git branch -m b1 archived/b1

and create a new b1 branch from wherever you want.

LeGEC
  • 46,477
  • 5
  • 57
  • 104
  • Ok, thanks. I was confused, because when I worked with `TortoiseHg` I could reopen closed, but not deleted branches – EgoPingvina Dec 14 '20 at 08:15