0
到文件我做到這一點:git的日誌--pretty錯誤
git log --all --format=format:'%C(bold blue)%h%C(reset) - %an%C(reset)%C(bold yellow)%d%C(reset) - %C(bold green)(%ad)%C(reset) %C(white)%s%C(reset) %C(bold white)'
正確的結果:
2c6f8b9 - Matheus - (Thu Sep 20 14:06:51 2012) ++ import clientes, ++ now send email ok!
102c911 - LIVE - (Thu Sep 20 13:25:24 2012) ++ db
93bf163 - Matheus - (Wed Sep 19 17:31:18 2012) ++ import clientes
8539cf4 - Matheus - (Wed Sep 19 16:41:56 2012) ++ import clientes, ++ now with defaultBilling and defaultShipping
843509a - Matheus - (Wed Sep 19 16:36:19 2012) ++ import clientes, ++ now with defaultBilling and defaultShipping
b8de06d - Matheus - (Wed Sep 19 15:48:05 2012) ++ import clients
要我的文件:
git log --all --format=format:'%C(bold blue)%h%C(reset) - %an%C(reset)%C(bold yellow)%d%C(reset) - %C(bold green)(%ad)%C(reset) %C(white)%s%C(reset) %C(bold white)' > file
的錯誤結果的時候保存在文件輸出中:
[1;34ma36b984[m - LIVE[m[1;33m[m - [1;32m(Thu Sep 20 16:16:57 2012 -0300)[m [37m++ import clientes, ok!![m [1;37m
[1;34m1794d80[m - Matheus[m[1;33m[m - [1;32m(Thu Sep 20 15:31:28 2012 -0300)[m [37mMerge remote-tracking branch 'live/master' into import-clientes[m [1;37m
[1;34me8a1735[m - LIVE[m[1;33m[m - [1;32m(Thu Sep 20 15:23:00 2012 -0300)[m [37m++ db[m [1;37m
[1;34m7c838ef[m - Matheus[m[1;33m[m - [1;32m(Thu Sep 20 15:00:52 2012 -0300)[m [37m++ import-clientes, external file[m [1;37m
[1;34m2c6f8b9[m - Matheus[m[1;33m[m - [1;32m(Thu Sep 20 14:06:51 2012 -0300)[m [37m++ import clientes, ++ now send email ok![m [1;37m
[1;34m102c911[m - LIVE[m[1;33m[m - [1;32m(Thu Sep 20 13:25:24 2012 -0300)[m [37m++ db[m [1;37m
[1;34m93bf163[m - Matheus[m[1;33m[m - [1;32m(Wed Sep 19 17:31:18 2012 -0300)[m [37m++ import clientes[m [1;37m
我嘗試沒有漂亮的格式,完美的工作。 後來我用漂亮的格式嘗試,不行!
我如何將它保存在一個文件中,格式漂亮?
謝謝。
你有漂亮的格式顯式顏色序列。你希望他們不要像他們顯然是在你的保存文件? –