Skip to content

Instantly share code, notes, and snippets.

@BlazerYoo
Last active February 9, 2023 01:11
Show Gist options
  • Save BlazerYoo/751939271746430f6a78f2172cada0c7 to your computer and use it in GitHub Desktop.
Save BlazerYoo/751939271746430f6a78f2172cada0c7 to your computer and use it in GitHub Desktop.
echo " __ __ __ __ ___ __ __ __ __ __ _____ __ "
echo "/ / \(_ _) /| / |__)|_ |__)/ \ (_ |_ | / \|__) "
echo "\__\__/__) /__ | / | \ |__| \__/ __)|__ | \__/| "
echo
echo
# $1 - github username
# $2 - name of COS217 template repo
# $3 - name of your private github repo
echo "Creating private repo '$3' based on '$2' for '$1'..."
echo
echo
# Bare clone template repo
git clone --bare https://github.com/COS217/$2
# Create private repo on github
curl -u $1 https://api.github.com/user/repos -d '{"name":"'"$3"'", "private":"true"}'
# Push template repo to your private repo
cd $2.git
git push --mirror https://github.com/$1/$3
# Clone private repo local machine
cd ..
git clone https://github.com/$1/$3
echo
echo
echo "Run cd $3 and get started."
echo
echo
echo "Created by Boaz"
echo "You're welcome."
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment