Skip to content

Instantly share code, notes, and snippets.

@martinobordin
Last active May 25, 2023 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinobordin/c024f990773b1bca047fc8a9e6cbf378 to your computer and use it in GitHub Desktop.
Save martinobordin/c024f990773b1bca047fc8a9e6cbf378 to your computer and use it in GitHub Desktop.
Git checkout\update develop & delete branches no more present in remote
git checkout develop; git remote update origin --prune;git pull; git branch -vv | Select-String -Pattern ": gone]" | % { $_.toString().Trim().Split(" ")[0]} | % {git branch -D $_}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment