Git 源码编译安装
在官网下载源码包
https://mirrors.edge.kernel.org/pub/software/scm/git/
编译安装,此处演示2.27.0版本。
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
定制git命令提示符
cat << ‘EOF‘ >> /etc/bashrc export PS1=‘\[\e[1;32m\][\\h \W \[\033[1;31m\]$(__git_ps1 "(git -> %s)")\[\e[1;32m\]]\$ \[\e[0m\]‘ EOF
相关推荐
瓜牛呱呱 2020-11-12
柳木木的IT 2020-11-04
yifouhu 2020-11-02
lei0 2020-11-02
源码zanqunet 2020-10-28
源码zanqunet 2020-10-26
一叶梧桐 2020-10-14
码代码的陈同学 2020-10-14
lukezhong 2020-10-14
lzzyok 2020-10-10
anchongnanzi 2020-09-21
clh0 2020-09-18
changcongying 2020-09-17
星辰大海的路上 2020-09-13
abfdada 2020-08-26
mzy000 2020-08-24
shenlanse 2020-08-18
zhujiangtaotaise 2020-08-18
xiemanR 2020-08-17