匯出差異文字檔

填入匯出的起迄Short Commit ID,產出test.text檔案

git diff f03d34e bf98076 --name-only > test.txt 

匯出差異檔案

填入要匯出的起迄Short Commit ID,產出異動檔案,並壓縮成files.tar

git archive --output=files.tar HEAD $(git diff 84a8230 2752266 --name-only --diff-filter=ACMRT HEAD) 

匯出檔案

將HEAD裡的全部檔案壓縮成files.tar

git archive --output=files.tar HEAD $(git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD)

刪除Remote上Push

git reset --hard HEAD~1
git push --force