Now Up To 80% OFF
Our Lowest Price of the Year Sale ends soon
Search
Close this search box.

Learn Git: How to Delete a Branch

Beginner Git Tutorial

Fundamentally, the branching model offered by Git works to avoid unstable code from being merged into your main codebase. If you decide you no longer need one of the branches in your repository, you can delete a Git branch to clean up your history.

Watch this beginner Git tutorial video to learn how to delete a Git branch, including how to delete a Git branch locally and how to delete a remote Git branch. Discover how deleting a local branch works in the terminal using the Git branch command, and alternatively, how to delete a remote branch in the CLI, using the git push command.

Finally, see an example of how easy and intuitive it is to delete a branch using the GitKraken Git GUI with just a few clicks.

Additional Resources

Table of Contents

Make Git Easier, Safer &
More Powerful

with GitKraken

Visual Studio Code is required to install GitLens.

Don’t have Visual Studio Code? Get it now.

Team Collaboration Services

Secure cloud-backed services that span across all products in the DevEx platform to keep your workflows connected across projects, repos, and team members
Launchpad – All your PRs, issues, & tasks in one spot to kick off a focused, unblocked day. Code Suggest – Real code suggestions anywhere in your project, as simple as in Google Docs. Cloud Patches – Speed up PR reviews by enabling early collaboration on work-in-progress. Workspaces – Group & sync repos to simplify multi-repo actions, & get new devs coding faster. DORA Insights – Data-driven code insights to track & improve development velocity. Security & Admin – Easily set up SSO, manage access, & streamline IdP integrations.
winget install gitkraken.cli