Skip to content

Instantly share code, notes, and snippets.

@seankross
Created February 5, 2014 18:26
Show Gist options
  • Star 30 You must be signed in to star a gist
  • Fork 19 You must be signed in to fork a gist
  • Save seankross/8830032 to your computer and use it in GitHub Desktop.
Save seankross/8830032 to your computer and use it in GitHub Desktop.
Initializing GitHub repository

Create a new repository on the command line

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/seankross/womp.git
git push -u origin master

Push an existing repository from the command line

git remote add origin https://github.com/seankross/womp.git
git push -u origin master
@cgthayer
Copy link

2020: Github doesn't support creating repos quite out-of-the-box (you need the UI). But I believe enterprise users can use REST or GraphQL:
https://developer.github.com/enterprise/2.20/

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