私は最近 GitHub for Windows をインストールし、git bash プロンプトを使用しています。現在私を悩ませていることの 1 つは、LS と入力すると、すべてのディレクトリが青色で表示されることです。
git bash シェルを変更して、LS と入力したときにディレクトリが別の色で青に表示されるようにするにはどうすればよいですか?
私は最近 GitHub for Windows をインストールし、git bash プロンプトを使用しています。現在私を悩ませていることの 1 つは、LS と入力すると、すべてのディレクトリが青色で表示されることです。
git bash シェルを変更して、LS と入力したときにディレクトリが別の色で青に表示されるようにするにはどうすればよいですか?
これは特に git の問題ではなく、使用しているシェルの問題です。Git 2.9+ を使用する MINGW32 の場合:
# Uncomment to use the terminal colours set in DIR_COLORS eval "$(dircolors -b /etc/DIR_COLORS)"
DIR 01;37 # Attribute=bold; Text color=white
DIR_COLORS ファイル:
# Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: # Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed # Text color codes: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white #NORMAL 00 # no color code at all #FILE 00 # regular file: use no color at all RESET 0 # reset to "normal" color DIR 01;37 # directory LINK 01;36 # symbolic link. (If you set this to 'target' instead of a # numerical value, the color is as for the file pointed to.)
次の投稿も参照してください。
古いバージョンの Git では、bash_profile
inGit_Installation\etc
フォルダーの色が変更されました。
LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=90'
export LS_COLORS
alias ls='ls -F --color --show-control-chars'
WindowsでGITを使用しようとしたことはありません...しかし、「git-config」でテキストの色を調整できるはずです。
直接編集できる (隠された?) .gitconfig ファイルもあります。
最後に、このリンクにはいくつかの良いヒントがあります。