Last active
November 21, 2015 15:56
-
-
Save spboyer/2e14713d26622f79d25f to your computer and use it in GitHub Desktop.
Create github repo
This file contains hidden or 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
## inits, adds the README and push -u | |
function git-create() { | |
local user="USERNAME" | |
local repo=$1; | |
echo "# " $repo >> README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
curl -u $user https://api.github.com/user/repos -d '{"name": "'$repo'"}' | |
git remote add origin [email protected]:$user/$repo.git | |
git push -u origin master | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment