Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.02 KB

升級版本.md

File metadata and controls

41 lines (34 loc) · 1.02 KB

到站點根目錄(保證.git目錄存在)執行

git pull

##出錯提示1:Peer reports incompatible or unsupported protocol version.

原因:Git版本過低

解決方法:

1、安裝所需軟體包

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel 
yum install gcc perl-ExtUtils-MakeMaker

2、下載&安裝

cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.7.3.tar.gz
tar xzf git-2.7.3.tar.gz
cd git-2.7.3
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc

3、檢查版本:2.X.X版本即可

git --version

出錯提示2:commit your changes or stash them before you can merge.

请提交下改动。如果不想提交, 请参考这个文章7.3 Git 工具 - 储藏与清理

#提交自己的工作
git commit -a -m 'some comment'