Skip to content

Instantly share code, notes, and snippets.

@spboyer
Last active November 21, 2015 15:56
Show Gist options
  • Save spboyer/2e14713d26622f79d25f to your computer and use it in GitHub Desktop.
Save spboyer/2e14713d26622f79d25f to your computer and use it in GitHub Desktop.
Create github repo
## 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 git@github.com:$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