Predictive Hacks

How to Delete a Remote Branch in Git

The scenario is that we work on a GitHub project and we would like to delete a branch from the remote repository. This is common when we work with “feature” branches and the feature is complete and merged. First, we can find the remote branches by typing:

git branch -r

Let’s say that we want to delete the new_feature remote branch. Then we can run the command:

git push origin --delete new_feature

An alternative way is to run:

git push origin :new_feature

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore

Python

Image Captioning with HuggingFace

Image captioning with AI is a fascinating application of artificial intelligence (AI) that involves generating textual descriptions for images automatically.

Python

Intro to Chatbots with HuggingFace

In this tutorial, we will show you how to use the Transformers library from HuggingFace to build chatbot pipelines. Let’s