git diff 等同于 git diff HEAD

jiqing@ubuntu:/home/wwwroot/default/siemens/new_hotel$ git diff HEAD
diff --git a/Index/Lib/Action/GetDataAction.class.php b/Index/Lib/Action/GetDataAction.class.php
index 1550a57..0f79846 100644
--- a/Index/Lib/Action/GetDataAction.class.php
+++ b/Index/Lib/Action/GetDataAction.class.php
@@ -60,8 +60,16 @@ class GetDataAction extends Action{
} /**
- * 获取统计数据
- *
+ * 统计数据展示
+ * 1 点我制作
+ * 2 开始
+ * 3 马上拍照
+ * 4 上一步
+ * 5 生成
+ * 6 重做
+ * 7 分享
+ * 8 ~ 26 (7 + i) 19个贴纸的点击,i为贴纸的id
+ * 27 ~ 45 ( 26 + i) 19个贴纸的使用,i为贴纸的id
*/

具体的某个版本与版本之间可以比较

jiqing@ubuntu:/home/wwwroot/default/siemens/new_hotel$ git diff HEAD^ HEAD^^
diff --git a/Index/Lib/Action/GetDataAction.class.php b/Index/Lib/Action/GetDataAction.class.php
index 1550a57..d997bcd 100644
--- a/Index/Lib/Action/GetDataAction.class.php
+++ b/Index/Lib/Action/GetDataAction.class.php
@@ -17,8 +17,9 @@ class GetDataAction extends Action{
* 5 生成
* 6 重做
* 7 分享
- * 8 ~ 26 (7 + i) 19个贴纸的点击,i为贴纸的id
- * 27 ~ 45 ( 26 + i) 19个贴纸的使用,i为贴纸的id
+ * 8 点我制作
+ * 9 ~ 27 (8 + i) 19个贴纸的点击,i为贴纸的id
+ * 28 ~ 46 ( 27 + i) 19个贴纸的使用,i为贴纸的id
*/
public function get_data(){
if(trim($_POST['type'])){
@@ -58,15 +59,4 @@ class GetDataAction extends Action{
send_http_status(200);
}
}

前后顺序无所谓

jiqing@ubuntu:/home/wwwroot/default/siemens/new_hotel$ git diff HEAD^^ HEAD^
diff --git a/Index/Lib/Action/GetDataAction.class.php b/Index/Lib/Action/GetDataAction.class.php
index d997bcd..1550a57 100644
--- a/Index/Lib/Action/GetDataAction.class.php
+++ b/Index/Lib/Action/GetDataAction.class.php
@@ -17,9 +17,8 @@ class GetDataAction extends Action{
* 5 生成
* 6 重做
* 7 分享
- * 8 点我制作
- * 9 ~ 27 (8 + i) 19个贴纸的点击,i为贴纸的id
- * 28 ~ 46 ( 27 + i) 19个贴纸的使用,i为贴纸的id
+ * 8 ~ 26 (7 + i) 19个贴纸的点击,i为贴纸的id
+ * 27 ~ 45 ( 26 + i) 19个贴纸的使用,i为贴纸的id
*/
public function get_data(){
if(trim($_POST['type'])){
@@ -59,4 +58,15 @@ class GetDataAction extends Action{
send_http_status(200);
}
}

git diff 分支1 分之2

看详细差异

jiqing@ubuntu:/home/wwwroot/default/siemens/new_hotel$ git diff siemens master
diff --git a/.gitignore b/.gitignore
index 8f32300..6655344 100755
--- a/.gitignore
+++ b/.gitignore
@@ -49,8 +49,6 @@ Shop/Runtime
*/*~
Public/Public
Public/upload/bgimg/*
-Public/log/*
-Public/tmp/*
!Public/upload/bgimg/.tmp .settings/
diff --git a/Index/Conf/config.php b/Index/Conf/config.php
index 4fd4d44..3124482 100644
--- a/Index/Conf/config.php
+++ b/Index/Conf/config.php
@@ -1,13 +1,4 @@

git diff 分支1 分之2 --stat

看大局差异

jiqing@ubuntu:/home/wwwroot/default/siemens/new_hotel$ git diff siemens master --stat
.gitignore | 2 -
Index/Conf/config.php | 21 +-
Index/Lib/Action/CommonAction.class.php | 61 +--
Index/Lib/Action/GetDataAction.class.php | 72 ---
Index/Lib/Action/SiemensAction.class.php | 715 ----------------------------
Index/Tpl/Circus/index.html | 3 +-
Index/Tpl/Siemens/index.html | 327 -------------
Index/Tpl/Siemens/share.html | 54 ---
Public/MP_verify_HIkhmwma5QBj98ns.txt | 1 -
Public/index.php | 4 +-
Public/siemens/css/.font-spider/PingFang ExtraLight.ttf | Bin 11035472 -> 0 bytes
Public/siemens/css/.font-spider/wryh.ttf | Bin 15043584 -> 0 bytes
Public/siemens/css/animate.css | 3279 -------------------------------------------------------------------------------------------------------------------------------
Public/siemens/css/animate.min.css | 6 -
Public/siemens/css/index.css | 605 ------------------------
Public/siemens/css/index.scss | 540 ---------------------
Public/siemens/css/reset.min.css | 2 -
Public/siemens/css/swiper.min.css | 15 -
Public/siemens/css/zepto.plugin.css | 87 ----
Public/siemens/css/zepto.plugin.scss | 87 ----
Public/siemens/font/msyh.ttf | Bin 21767952 -> 0 bytes

还可以进行本地分支与线上分支的比较

jiqing@ubuntu:/home/wwwroot/default/5hao/sheep-doc$ git diff origin/5hao
diff --git a/cart.md b/cart.md
index 0174a54..b2861b3 100644
--- a/cart.md
+++ b/cart.md
@@ -80,7 +80,6 @@ uid 有则传,无则不传
"name": "法兰西苹果",
"has_activity": 0,
"id": "1", // 商品id
- "type":"1", //type:1.自营商品;2.积分好货
"collection" : 1
"is_relation_attr": [
{
@@ -111,7 +110,6 @@ uid 有则传,无则不传
"has_activity": 0,
"collection" : 1
"id": "2",
- "type":"2", //type:1.自营商品;2.积分好货
"is_relation_attr": [
{
"name": "产地",

默认拿当前本地版本对比线上的最新版本。

如果有一段时间,没有更新,则需要处理一下,才能对比出最新的代码。

git fetch origin
git diff yanglu origin/gaodian

或者只看文件

git diff yanglu origin/gaodian --stat

最新文章

  1. Parse xml/json[xpath/jpath]
  2. JS this,call和apply以及回调函数
  3. Linux准确获取IP
  4. 09-Java 工程结构管理
  5. 用PHP实现守护进程任务后台运行与多线程(php-resque使用说明)
  6. C语言之循环结构 for(二)
  7. awk简单用法
  8. Canvas createLinearGradient API
  9. (原创)Java多线程作业题报java.lang.IllegalMonitorStateException解决
  10. iOS 屏幕方向
  11. [ gczdac ] 20190306 访者必阅
  12. Tensorflow--矩阵切片与连接
  13. hibernate 调用存储过程返回参数
  14. NLP相似度之tf-idf计算
  15. Javascript高级编程学习笔记(83)—— 富文本选区(3)
  16. 题解-AtCoder Code-Festival2017qualA-E Modern Painting
  17. linux把程序做成系统服务并自启动
  18. Spring Boot 1.5.10 发布:修复重要安全漏洞!!!
  19. 31-ADC模拟/数字转换
  20. python垃圾回收机制(转)

热门文章

  1. java虚拟机(八)--java性能监控与故障处理工具
  2. JavaScipt30(第四个案例)(主要知识点:数组原型链上的一些方法)
  3. HDU多校Round 6
  4. python的webservice请求
  5. PHP--选择排序
  6. LeetCode141LinkedListCycle和142LinkedListCycleII
  7. JSP页面中的指令标识
  8. python3的dict
  9. graph.h
  10. slf4j+log4j2的配置