Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A simple bash script to create a repository from the console. Be sure to replace "USERNAME" with your Github user name. This script utilizes
#! /usr/bin/bash
echo "Creating the repository"
gh re --browser false --new "$NAME" --type "$TYPE"
mkdir "$NAME"
cd "$NAME"
echo "# $NAME" >>
git init
git add .
git commit -m "📦 NEW: Initial commit"
git remote add origin$NAME.git
git push --set-upstream origin master
git push
echo ''
echo "DONE:$NAME"
echo ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment