As stated by a recent change to the GitHub API, it's now possible to create and initialize a repo a the same time through your preferred shell.
"Today we’ve made it easier to add commits to a repository via the GitHub API. Until now, you could create a repository, but you would need to initialize it locally via your Git client before adding any commits via the API."
"Now you can optionally init a repository when it’s created by sending true for the auto_init
parameter:"
curl -i -u pengwynn \
-d '{"name": "create-repo-test", "auto_init": true}' \
https://api.github.com/user/repos
This auto initialization feature also allows one to dynamically add a .gitignore
file to the repository from the .GitHub .gitignore repository by passing the name of the template to the "gitignore_template"
parameter of the curl request.