是否有可能更改git reflog
中散列的顏色?它現在使用的一個很難閱讀。我想在我的.gitconfig
文件中的以下內容:更改「git reflog」的顏色
[color "reflog"]
hash = red
我也試過ref
和reference
。我在Ubuntu上使用git 2.5.1。
是否有可能更改git reflog
中散列的顏色?它現在使用的一個很難閱讀。我想在我的.gitconfig
文件中的以下內容:更改「git reflog」的顏色
[color "reflog"]
hash = red
我也試過ref
和reference
。我在Ubuntu上使用git 2.5.1。
您可以使用--pretty
來自定義輸出。 要改變哈希紅色:
git reflog --pretty='format:%C(red)%h%Creset %gD %gs'
或包括分支名稱,變化相對日期和作者
git reflog --pretty='format:%C(red)%h%Creset %gD: %gs %C(yellow)%d%Creset %Cgreen(%ar) %C(bold blue)<%an>%Creset'
看到git help log
更多的格式選項。
在本答案的示例中,使用'%gD'而不是'-'來獲取通常位置和格式的reflog選擇器。 – Wolf
@Wolf,謝謝,我更新了我的回答 – joran
我添加了一個別名「rl」,它使用了你的配置。是否可以爲'git reflog'創建'reflog'別名? –