Nov 10, 2018

GitHub common operations on the command line

To create a new repository on the command line

echo "# tmp" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:i88ca/tmp.git
git push -u origin master

To push an existing repository from the command line

git remote add origin git@github.com:i88ca/tmp.git
git push -u origin master