Last active
May 24, 2019 13:06
-
-
Save jan-koch/3e255c98c116c58cb41a2348b90dd913 to your computer and use it in GitHub Desktop.
A simple bash script to create a repository from the console. Be sure to replace "USERNAME" with your Github user name. This script utilizes nodegh.io.
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
#! /usr/bin/bash | |
NAME=$1 | |
TYPE=$2 | |
echo "Creating the repository" | |
gh re --browser false --new "$NAME" --type "$TYPE" | |
mkdir "$NAME" | |
cd "$NAME" | |
echo "# $NAME" >> README.md | |
git init | |
git add . | |
git commit -m "📦 NEW: Initial commit" | |
git remote add origin [email protected]:USERNAME/$NAME.git | |
git push --set-upstream origin master | |
git push | |
echo '' | |
echo "DONE: https://github.com/USERNAME/$NAME" | |
echo '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment