2013-04-22 131 views
0

Git在終端行爲非常古怪。git命令不能在終端工作

這裏是終端如何迴應時,我有一個git命令

git log 

enter image description here

不知道如何解決它。

這是怎樣的.bash_profile loks像

"$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function 
if [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then 
. /usr/local/etc/bash_completion.d/git-completion.bash 
fi 

export PS1='\[\033[01;32m\]\[email protected]\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]$(git branch  &>/dev/null; if [ $? -eq 0 ]; then echo "\[\033[01;33m\]($(git branch | grep ^*|sed s/\*\ //))\[\033[00m\]"; fi)$ ' 
+1

這是混帳或您的配色方案有問題嗎? – drhenner 2013-04-22 18:08:26

+0

我猜git存在一些問題,因爲我試圖在配置文件中刪除if和export語句。它表現得一樣。 – user1772643 2013-04-22 18:15:09

+0

你可以試試運行'git log |少「,看看你是否在'less'尋呼機內看到任何有效的輸出? – Tuxdude 2013-04-22 19:20:41

回答

1

更改git的顏色配置使用下面的命令:

git config --global color.ui [always|auto|never]