第一天git学习记录
2016-02-18 16:27
197 查看
下载
下载最新的git windows版本http://git-scm.com/download/
设置用户名和Email
开始->程序->Git->Git Bash打开git终端设置用户名和Email
git config –global user.name “Your Name”
git config –global user.email “email@example.com”
查看当前的用户名和Email
git config –global user.name
git config –global user.email
初始化仓库
git init文件添加到仓库
git add readme.txt文件提交到仓库
git commit -m “wrote a readme file”-m后面输入的是本次提交的说明,可以输入任意内容,当然最好是有意义的,这样你就能从历史记录里方便地找到改动记录。
查看仓库当前的状态
git status查看difference
git diff显示从最近到最远的提交日志
git loggit log –pretty=oneline 更为简洁的显示日志
记录你的每一次命令
git reflog回退到某一个版本
git reset –hard commit_id今天就学到这里
相关文章推荐
- PHP new self和new static的区别
- CUDA_HelloWorld篇
- iOS提交遇到的新问题
- Zxing生产二维码 附带添加logo
- <c:remove>和<c:catch>-------JSTL
- plsql的一些配置
- SpringMVC中使用Interceptor拦截器
- ASP.NET Form身份验证方式详解
- Js基础知识梳理系列(01):数据类型
- Android应用架构 (Android Dev Summit 2015)
- php数组取数组名包含***的
- 配置错误:clean时,出现错误MSB4044
- 在Ubuntu系统下安装使用Python的GUI工具wxPython
- Linux 下 C语言大文件读写(大于4G)
- javascript 修改meta
- 代码重构的意义
- storm提交拓扑后出现Executor topology_name not alive的问题
- JSP EL表达式
- mysql 中定时任务event的创建
- 在vmware fusion 8 for Mac上安装windows 7 64bit