Skip to content

Instantly share code, notes, and snippets.

@jghorton14
Last active November 29, 2019 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jghorton14/60555d8542c8f0161b0ee1bb3167751a to your computer and use it in GitHub Desktop.
Save jghorton14/60555d8542c8f0161b0ee1bb3167751a to your computer and use it in GitHub Desktop.
Create new github repo from cmd line and push code to github
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}'
echo "# REPO" >> README.md
git init
git add .
git commit -m "first commit"
git remote add origin https://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