Push existing github repository from the command line


The following are the commandlets to push the existing repository from the local system to github

 

git remote add origin https://github.com/personal-org/mocks.git
git push -u origin master
Advertisements

Create github repository in command line


The following are the commandlets to create a new repository in github

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