Skip to content

Instantly share code, notes, and snippets.

@justinobney
Created June 8, 2017 13:44
Show Gist options
  • Select an option

  • Save justinobney/28a65b7b3797593f5f01a843b3e31b13 to your computer and use it in GitHub Desktop.

Select an option

Save justinobney/28a65b7b3797593f5f01a843b3e31b13 to your computer and use it in GitHub Desktop.
Windows GIT Cleanup
git branch --merged | ?{-not ($_ -like "*master")} | %{git branch -d $_.trim()}
git branch --no-merged | ?{-not ($_ -like "*master")} | %{git branch -D $_.trim()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment