Home git How to remove a local branch that was created from another branch?

How to remove a local branch that was created from another branch?

Author

Date

Category

I wanted to create a new twig from the master in Intellij Idea, but instead accidentally created a branch from another branch (Homework-6)
Tell me how to remove an unnecessary branch, in this case “HM6”?
Perhaps there were similar questions, but I do not want to exacerbate the situation with the wrong actions


Answer 1, Authority 100%

When a new branch is created, in the Intellij IDEA interface in the window for the name of the branch, there is a switch “Checkout Branch”, due to which the newly created branch becomes active. Default it is enabled.

In Git you can not remove the branch on which you are.

First you need to checkout on another, and then delete will appear in the interface – what is needed.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions