2017-06-14 76 views
0

我需要排除特定的文件根據其擴展排除擴展特定的文件,我的命令現在是這樣的:從git的日誌

git log --author="author.name" --pretty=tformat: --numstat 

我要補充排除例如與擴展.ktr所有文件和.db_diagram?

謝謝!

回答

1

使用grep:

git log --author="author.name" --pretty=tformat: --numstat | grep -v -E '*\.(klr|db_diagram)$' 
+0

嗨!我已經嘗試過,但它不包含帶有這些擴展名的文件。 – rlopezo

+0

我編輯了我的答案,但我認爲這不會解決問題。你在運行什麼操作系統?哪個外殼? – Arount

+0

謝謝!它現在有效! – rlopezo

0

嘗試:

git log --author="author.name" --pretty=tformat: --numstat | grep -v -E '*.ktr|*.db_diagram' 
2

git log --author="author.name" --pretty=tformat: --numstat -- . ':!*.ktr' ':!*.db_diagram'