Last active
December 20, 2015 19:48
-
-
Save gabrieljoelc/6185434 to your computer and use it in GitHub Desktop.
CLI commands for github API v3 (replace all CAPS keywords). Ripped off from http://stackoverflow.com/a/10325316/34315.
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
Invoke-RestMethod -Uri https://api.github.com/user/repos ` | |
-Body (@{"name"="REPO"} | ConvertTo-Json) ` | |
-Credential 'USER' ` | |
-Method Post ` | |
git remote add origin [email protected]:USER/REPO.git | |
git push origin master |
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
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}' | |
git remote add origin [email protected]:USER/REPO.git | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment