How do I delete a branch locally and remotely in Git?

Learn how to view and delete branches on both local and remote repositories so you can keep your project tidy and manageable.

By Lorna Jane Mitchell
September 21, 2016
Screenshot from "How to delete a branch locally and remotely" Screenshot from "How to delete a branch locally and remotely"

A characteristic feature of Git is the ability to create branches so that developers can work on new features in isolation. But what happens when the number of branches gets out of control? This video teaches Git beginners how to delete a branch that is no longer needed. Lorna demonstrates how to view and delete branches on both local and remote repositories so that you can keep your project tidy and manageable.

Sign up for Safari today and get 10 days of free access to the Git Learning Path and more.

Learn faster. Dig deeper. See farther.

Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Learn more

Lorna Mitchell is based in Leeds, UK where she is a Developer Advocate at IBM Cloud Data Services and an experienced developer and trainer. Lorna is the accomplished author of a number of books including PHP Web Services, the Git Workbook, and PHP Master. She brings her technical expertise to audiences all over the world, dispensing guidance on a wide range of technical topics, all with a very practical slant. When she’s not busy spreading knowledge, Lorna blogs at lornajane.net.

Post topics: Software Engineering
Post tags: Questions
Share: