Skip to content

Instantly share code, notes, and snippets.

@Jimfarrugia
Last active April 4, 2019 09:42
Show Gist options
  • Save Jimfarrugia/2d9ef2275ff7e1a157ecc816e007a256 to your computer and use it in GitHub Desktop.
Save Jimfarrugia/2d9ef2275ff7e1a157ecc816e007a256 to your computer and use it in GitHub Desktop.

Create github repo from cli:

$curl -u 'jimfarrugia' https://api.github.com/user/repos -d '{"name":"","description":""}'

Add remote and push:

$ git remote add origin https://github.com/jimfarrugia/{name}.git

$ git push -u origin master

List all my Github repos:

(using 'jq' to parse JSON data from github's API)

$ curl -u 'jimfarrugia' https://api.github.com/user/repos -G | jq '.[].name'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment