-
-
Save ralekna/047c0f81aeace9ff91d1 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Form from https://gist.github.com/robwierzbowski/5430952/ | |
# Create a remote repo on GitHub and clone it to your computer | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Get user input | |
echo "New repo name:" | |
read REPONAME | |
echo "Git Username:" | |
read USER | |
echo "Repo Description:" | |
read DESCRIPTION | |
echo "Here we go..." | |
# Curl some json to the github API oh damn we so fancy | |
curl -u ${USER} https://api.github.com/user/repos -d "{\"name\": \"$REPONAME\", \"description\": \"$DESCRIPTION\", \"auto_init\":true}" | |
# Cloning repo to local computer | |
git clone [email protected]:$USER/$REPONAME.git | |
# cleaning up | |
REPONAME= | |
USER= | |
DESCRIPTION= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment