初始化目录,并且添加到远程仓库

mkdir repo_name
cd repo_name
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://git.oschina.net/jinchunguang/repo_name.git
git push -u origin master
原文地址:https://www.cnblogs.com/chunguang/p/5584248.html