Tips&Tricks

How to delete a Git branch both locally and remotely

git

Git is a distributed version control system for tracking changes in source code during software development. In general all the changes in the branches. So you need at least one brach for each feature.

When feature is done it merges to master branch. And you may want to delete feature-branch.

Delete the branch from remote repository:

git push --delete  

Delete the branch from local repository:

git branch -d