Git for Windows doesn't execute my .bashrc file

后端 未结 4 2094
渐次进展
渐次进展 2020-12-24 00:57

I\'ve just installed Git for Windows 2.5.0 on Windows 7, and it appears that my .bashrc file is not being executed when I run Git Bash.

I created the fi

4条回答
  •  孤城傲影
    2020-12-24 01:36

    OK, I found out the problem. Quite simply, the bash terminal used by the latest Git for Windows 2.5.0 (mintty) doesn't bother to read .bashrc - it reads .bash_profile. So you can set up your environment in .bash_profile and/or put this code at the start to read .bashrc:

    if [ -f ~/.bashrc ]
    then
        . ~/.bashrc
    fi
    

提交回复
热议问题