Created
January 31, 2018 12:03
-
-
Save scottgulliver/a4369484da598be87944f4afb16355e8 to your computer and use it in GitHub Desktop.
Powershell script to checkout all remote git branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -r | Select-String -Pattern "->" -NotMatch | Select-String -pattern "^ origin/" | foreach { $_ -replace '^ origin/', '' } | Foreach { git checkout $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment