一、下载安装
下载地址:Git - Install for Windows
二、配置git用户目录
找到git安装目录,打开:"Git/etc/profile"
添加以下内容:
.....
MAYBE_FIRST_START=false
if [ ! -d "${HOME}" ]; then
printf "\e[1;32mMSYS2 is starting for the first time. Executing the initial setup.\e[1;0m\n" 1>&2;
MAYBE_FIRST_START=true
fi
HOME="指定git的HOME路径"
.....
cd $HOME // 启动时默认跳转到HOME路径下
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\] \n# '