6、git和github

参考:http://www.cnblogs.com/qianmojing/p/6484162.html
http://www.jb51.net/article/70729.htm
http://www.cnblogs.com/jhj117/p/4944790.html
https://www.zhihu.com/question/20070065


git config --global user.name "username"
git config --global user.email "1234567@qq.com"
#表示这台机器上所有的Git仓库都会使用这个配置
cd F: mkdir git
echo "# supreme-octo-carnival" >> README.md ##touch README.md
git init                                   #初始化版本库,用于生成.git文件
git add README.md ##git add * #
README.md 添加到暂存区里面去
git commit -m "first commit"               # git commit告诉Git,把文件提交到仓库。-m是提交的注释
git status #命令git status来查看是否还有文件未提交
git diff 
#想看下README.md文件到底改了什么内容
git log 对readme.txt文件做了修改,想查看下历史记录
git remote add origin https://github.com/samll-rookie/supreme-octo-carnival.git #将仓库连接到远程服务器
git push -u origin master #将改动推送到所添加的服务器上


posted @ 2017-09-17 15:39  风中之铃  阅读(215)  评论(0编辑  收藏  举报