参考链接:http://www.cnblogs.com/wmr95/articles/7768492.html
主要参考上面的链接,下面只是笔者根据上面链接总结上传的文件到github的步骤,配置环境按照上面的参考链接。
1. 初始化
git init
2. 下载自己需要上传的github仓库
git clone + github仓库名称
3. 将要添加的文件clone到仓库目录下面,进入到仓库目录下
4. 添加文件到仓库目录
git add filename
5. 在.git/config 中添加如下内容
[user]
email = dytrong1994@gmail.com
name = dyrong
邮箱和名字可以随便填写
6. commit 推送
git commit -m "first time to upload github"
7.第一次使用 git push origin master 以后使用 git push