博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

查看文件的提交记录

Posted on 2024-09-27 13:17  TGL233  阅读(50)  评论(0)    收藏  举报

文件提交记录

查看文件的历史提交记录

如果我们想查看某个文件的历史提交记录可以用 git log --oneline <file>

TGL@TGL MINGW64 ~/Desktop/TH-ISE130-I/feature (feature)
$ git log --oneline Project/04_ADC/adc.c
82c2cd7 (HEAD -> feature) 2024年09月13日 17:01:51
8a33007 temp-2024-09-06
6955e49 完成ADC和CAN模块

比较文件的历史提交中的差异

比较文件历史提交中的差异 git diff <commit-id> <commit-id> <file> 或 VSCode 中使用 Git History Diff 插件

$ git diff 82c2cd7 6955e49 Project/04_ADC/adc.c
diff --git a/Project/04_ADC/adc.c b/Project/04_ADC/adc.c
     } else {
-               while(1);
         return -1;
     }

@@ -165,7 +164,7 @@ static void dma_event_callback(uint32_t event)
 {
     if (event == GPDMA_EVENT_TERMINAL_COUNT_REQUEST) {
         TIM0_stop();
-        // ADC_stop();
+        ADC_stop();
         ADC_Done = 1;
     }
 }
@@ -174,7 +173,7 @@ void ADC_TIM_DMA_start(uint8_t channel)
 {
     uint8_t ch;

-    //adc_4051_select(channel);
+    adc_4051_select(channel);
     ADC_Done = 0;