1、在网页创建一个项目,名字为hello
url为:https://github.com/yourname/hello
2、在本地一个目录,使用git clone 得到这个项目
git clone https://github.com/yourname/hello
3、进入这个目录,添加文件
git add .
git commit -m "hello"
4、添加remote
git remote add hello git@github.com:yourname/hello.git
如果显示已添加,移除这个remote
git remote rm hello
5、提交项目
git push hello master