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
<# | |
.SYNOPSIS | |
This script checks out all branches of a Git repository into separate folders. | |
.DESCRIPTION | |
To run this script, follow these steps: | |
1. Open PowerShell as the current user. | |
2. Temporarily set the execution policy for the current session to Unrestricted by running: | |
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process | |
3. Run the script with the repository URL as a parameter: |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"math/rand" | |
"os" | |
"strings" |