搜尋

首頁  >  問答  >  主體

Git 如何只查看commit中某一個檔案的變化

一共有三次commit,如,

history_commit_a
history_commit_b
history_commit_c

其中,history_commit_b中有50個檔案做了修改,檔案名稱分別為

        history_commit_b_file1
        history_commit_b_file2
        history_commit_b_file3
        .
        .
        .

等等。

那麼問題來了。如果我想看history_commit_b中history_commit_b_file50發生了哪些變化,直接使用:

git show history_commit_b;

git會把所有檔案的變化一下子全部列出來,能不能用指令控制git只顯示出history_commit_b中的history_commit_b_file50檔的變化、而不顯示history_commit_b_file1...history_commit_b_file49檔的變化。

大家讲道理大家讲道理2839 天前602

全部回覆(1)我來回復

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-02 09:48:46

    gitk history_commit_b_file50
    git show history_commit_b history_commit_b_file50

    回覆
    0
  • 取消回覆