Skip to content

Instantly share code, notes, and snippets.

View APratham's full-sized avatar
:octocat:

Antariksh Pratham APratham

:octocat:
View GitHub Profile
@APratham
APratham / checkout.ps1
Last active May 16, 2024 18:30
Script to download all branches of a repository into different folders
<#
.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:
@APratham
APratham / main.go
Created March 23, 2021 17:45
AutoUpdate
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"os"
"strings"