使用github仓库

本地仓库和远程仓库搭建好之后,把内容上传到远程仓库:

$ git add text.txt                //把文件添加到本地git仓库   后面是文件名

$ git commit -m "test2"        //把文件提交到本地仓库 ,git commit -m后面相当于给本次提交加一个注释
$ git push -u origin master   //把内容推送到github(首次使用需要加 -u参数  其余时候不加)

使用github仓库