spb 2020-07-18
https://mirrors.edge.kernel.org/pub/software/scm/git/
tar xf git-2.27.0.tar.gz cd git-2.27.0 yum install gcc zlib-devel.x86_64 ./configure --prefix=/usr/local/git && make && make install
Git 命令补全设置
./contrib/completion mv git-completion.bash git-completion.sh cp git-completion.bash git-prompt.sh /etc/profile.d/
cat << ‘EOF‘ > /etc/profile.d/git.sh export GIT_PS1_SHOWDIRTYSTATE=1 export GIT_PS1_SHOWSTASHSTATE=1 export GIT_PS1_SHOWUNTRACKEDFILES=1 export GIT_PS1_SHOWUPSTREAM="verbose git svn" export GIT_HOME=/usr/local/git export PATH=$PATH:$GIT_HOME/bin EOF
cat << ‘EOF‘ >> /etc/bashrc export PS1=‘\[\e[1;32m\][\\h \W \[\033[1;31m\]$(__git_ps1 "(git -> %s)")\[\e[1;32m\]]\$ \[\e[0m\]‘ EOF