Skip to content

Instantly share code, notes, and snippets.

@DarwinniwraD
Forked from alexpchin/Setting_upa_new_repo.md
Last active November 24, 2017 02:51
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 DarwinniwraD/0a230ba9fc8eb896541f6cceba1746e4 to your computer and use it in GitHub Desktop.
Save DarwinniwraD/0a230ba9fc8eb896541f6cceba1746e4 to your computer and use it in GitHub Desktop.
Create a new repository on the command line

Setting up a new Git Repo

##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 git@github.com:<username>/<reponame>.git
git push -u origin master

##Push an existing repository from the command line

git remote add origin git@github.com:<username>/<reponame>.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment