Delete all local branches that are not master [Windows]

git branch | Where-Object { !$_.Contains('master') } | ForEach-Object { git branch -D $_.Trim() }

-1
2019-07-22 06:25:09

What Others Think

It is very difficult for me to find out the codes for this. Plant-Based Diet As you are not given any information on this. It makes it very difficult for me to know what really it is. Thanks, for sharing.
zaiyamariya · 51 weeks and 2 days ago
This is great! Thanks so much! cleaning services orlando
aegyjingoo · 42 weeks and 3 days ago
Understanding and learning commands is a tough task and this post will discuss the details regarding www.buildingblockcapital.com commands for deleting all local branches that are not master. Nowadays there are a lot of options for students to learn such languages. I am looking here for more details and keep up the good work.
Alyssalauren · 42 weeks and 2 days ago
Discuss more like this cryo facial pensacola
geebranz · 36 weeks and 5 days ago
Thanks a lot for sharing the code that helps in deleting all local branches that are not master and I think a brief explanation of the code could have been added so that those who are trying it out can understand the code you have shared here Sexual Assault Kit Backlog
Kaitlyn · 35 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: