Git產生差異清單及差異檔案的語法

GorgoasTW
1 min readJun 7, 2018

--

產生差異清單

git diff-tree -r --no-commit-id --name-status --text --diff-filter=ACDMRT c50e20c c4cedad > ../diff.txt

產生差異檔案

git archive --format=zip --output=../diff.zip HEAD $(git diff-tree -r --no-commit-id --name-only --text --diff-filter=ACMRT c50e20c c4cedad)

備註1:要把 c50e20c 4fda39d 換成想比對差異的版本號碼

備註2:請先移動(cd)到git資料夾

--

--

GorgoasTW
GorgoasTW

Written by GorgoasTW

iOS Developer/.NET Developer/Father

No responses yet