Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 724 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 724 Bytes

Create a new private repository on the command line

Setting up a new Git Private Repo on the command line

Create a new repository on the command line

touch README.md
git init
git add README.md
git config  user.email YOUR_EMAIL
git config  user.name YOUR_USERNAME
git commit -m "first commit"
curl -u YOUR_USERNAME:YOUR_TOKEN https://api.github.com/user/repos -d '{"name":<reponame>, "private":"true"}'
git remote add origin https://YOUR_USERNAME:[email protected]/YOUR_USERNAME/<reponame>.git
git push -u origin master

Push an existing repository from the command line

git remote add origin https://YOUR_USERNAME:[email protected]/YOUR_USERNAME/<reponame>.git
git push