git diff 输出结果分析
2016-03-18 19:21
519 查看
转载请标明出处:http://blog.csdn.net/xx326664162/article/details/50926001 文章出自:薛瑄的博客
你也可以查看我的其他同类文章,也会让你有一定的收货!
通常working area的文件都是被当作目标文件来看待。
-开头的行,是只出现在源文件中的行
+开头的行,是只出现在目标文件中的行
空格开头的行,是源文件和目标文件中都出现的行
差异按照差异小结进行组织,每个差异小结的第一行都是定位语句,由@@开头,@@结尾。
上面的diff结果表明
1.某个提交记录0c5ee代表的socket_helper.cpp文件是源文件,当前working area的socket_helper文件是目标文件。
2.在源文件第4行开始的6行和目标文件第4行开始的7行构成一个差异小结
3.这个差异小结中,目标文件添加了一行#include “helper/time_measure.h”
4.其他空格开头的行表明没有差异。
参考:
http://blog.csdn.net/gsls181711/article/details/45149635
你也可以查看我的其他同类文章,也会让你有一定的收货!
---代表源文件 +++代表目标文件
通常working area的文件都是被当作目标文件来看待。
-开头的行,是只出现在源文件中的行
+开头的行,是只出现在目标文件中的行
空格开头的行,是源文件和目标文件中都出现的行
差异按照差异小结进行组织,每个差异小结的第一行都是定位语句,由@@开头,@@结尾。
举例:
chenshu@chenshu-yangzhou-home:~/kaimei/data_service/src$ git diff 0c5ee16a6a4c849d0ae0448caa8ff174399c7c3c ./socket_helper.cpp diff --git a/data_service/src/socket_helper.cpp b/data_service/src/socket_helper.cpp index d606452..047e213 100755 --- a/data_service/src/socket_helper.cpp +++ b/data_service/src/socket_helper.cpp @@ -4,6 +4,7 @@ #include "data/login_response.h" #include "data/heartbeat_response.h" #include "helper/parser.h" +#include "helper/time_measure.h" #include <booster/log.h> #include "exception/socket_error.h" #include "exception/data_error.h"
上面的diff结果表明
1.某个提交记录0c5ee代表的socket_helper.cpp文件是源文件,当前working area的socket_helper文件是目标文件。
2.在源文件第4行开始的6行和目标文件第4行开始的7行构成一个差异小结
3.这个差异小结中,目标文件添加了一行#include “helper/time_measure.h”
4.其他空格开头的行表明没有差异。
参考:
http://blog.csdn.net/gsls181711/article/details/45149635
相关文章推荐
- HDOJ 1090 A+B for Input-Output Practice (II)
- Gabor滤波器与特征提取
- 特殊的ip地址
- Java 第二次作业
- 用C写个简单的游戏
- Android通讯录数据库介绍与基本操作(增删改查)
- 静态语句块、构造语句块与构造方法执行顺序
- 解决HP ProLiant DL380 G5的Centos 7安装与启动不能识别硬盘问题
- ext2文件系统源代码之inode.c
- CyclicBarrier和CountDownLatch区别
- Pixhawk之姿态解算篇(1)_入门篇(DCM Nomalize)
- 界面和效果
- curl命令
- linux下查找文件包含关键字
- linux 常用的基本命令
- FFmpeg 官方 20160227 之后 追加 libmfx 无法在 xp 上运行的解决方法
- 马克飞象(Mark Dumbo)
- jquery easyui 高度自适应
- http协议返回状态值及意义
- Android系统将内置滤镜功能