Skip to content

Instantly share code, notes, and snippets.

@jlollis
Forked from alexpchin/Setting_upa_new_repo.md
Created December 15, 2018 19:41
Show Gist options
  • Select an option

  • Save jlollis/8db6d6f4f6f729c1bb3e5a958425cafe to your computer and use it in GitHub Desktop.

Select an option

Save jlollis/8db6d6f4f6f729c1bb3e5a958425cafe 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:alexpchin/<reponame>.git
git push -u origin master

##Push an existing repository from the command line

git remote add origin git@github.com:alexpchin/<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