Adding and removing remote branches

less than 1 minute read

git is great at creating and merging local branches. But what about when you’ve pushed those branches to a remote repository to update another system?

Removing the remote branches isn’t an easy task, the syntax is cryptic:

git push origin :feature_branch

The colon instructs git to remove the branch.

Cleaning up a local tracking branches for the remote is straight forward:

git remote prune origin