首页 > 代码库 > git查看某个文件的修改历史

git查看某个文件的修改历史

有时候在比对代码时,看到某些改动,但不清楚这个改动的作者和原因,也不知道对应的BUG号,也就是说无从查到这些改动的具体原因了~

【注】:某个文件的改动是有限次的,而且每次代码修改的提交都会有commit描述,



@c1-System-Product-Name:~/data/android_code/packages/apps/VargoService/src/cn/com/vargo/cloudservice/contacts$git log --pretty=oneline ContactsSyncService.java

13338d571a4743f8830081c911b4aebbb6680b89 添加同步接口已经数据查询
@c1-System-Product-Name:~/data/android_code/packages/apps/VargoService/src/cn/com/vargo/cloudservice/contacts$git log --pretty ContactsSyncService.java
commit 13338d571a4743f8830081c911b4aebbb6680b89
Author: liuyongsheng <liuyongsheng@iradar.cn>
Date:   Wed Mar 12 18:29:20 2014 +0800


    添加同步接口已经数据查询
@c1-System-Product-Name:~/data/android_code/packages/apps/VargoService/src/cn/com/vargo/cloudservice/contacts$ ^C
@c1-System-Product-Name:~/data/android_code/packages/apps/VargoService/src/cn/com/vargo/cloudservice/contacts$git show 13338d571a4743f8830081c911b4aebbb6680b89
commit 13338d571a4743f8830081c911b4aebbb6680b89
Author: 
Date:   Wed Mar 12 18:29:20 2014 +0800


    添加同步接口已经数据查询


diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index bdebb94..d90312e 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -231,6 +231,15 @@
                 <action android:name="com.iradar.aidl.RemoteIradarVcloudService" /> 
             </intent-filter> 
        </service>
+       
+        <service
+            android:name="cn.com.vargo.cloudservice.contacts.ContactsSyncService" 
+            android:exported="true">
+            <intent-filter>
+                <action android:name="android.content.SyncAdapter" />
+            </intent-filter>
+            <meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter_contacts" />
+        </service>
         
     </application>
 
diff --git a/res/xml/syncadapter_contacts.xml b/res/xml/syncadapter_contacts.xml

git查看某个文件的修改历史