DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Vidisha Parab
Vidisha Parab

Posted on

things I learnt today - delete remote branch through cli

list only the remote branches
git branch -r

delete a remote branch
git push -d origin <branch_name>

remove stale/obsolete remote branch references from local
git fetch --all --prune

Top comments (0)

πŸ‘‹ Hey, my name is Noah and I’m the one who set up this ad. My job is to get you to join DEV, so if you fancy doing me a favor, I’d love for you to create an account.

If you found DEV from searching around, here are a couple of our most popular articles on DEV: