create a new repo
- initialization a repo
mkdir NEWDIR
cd NEWDIR
git init
- make a connection with local repo and remote repo
git remote add origin https://github.com/doctorhui/Blog.git
- make your change to local repo
echo "blablabla" >> README.md
git add README.md
git commit -m "first commit"
- synchonize local repo and remote repo
git push -u origin master
- make change in your local repo
git add
git commit -m "foofoo"
- synchronize local repo and remote repo
git push
push an exiting repo
all you need to do is the third step
reference
liaoxuefeng
ruanyifeng