Creating new repository or push an existing repository to github by command line

Create a new repository

echo "# [project name]" >>
git init
git add
git commit -m "first commit"
git remote add origin[your github account]/[project].git
git push -u origin master

Push an existing repository

git remote add origin[your github account]/[existing project].git
git push -u origin master
Like what you read? Give Luis Wu a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.