如何在共享主机上安装和配置git?

时间:2014-02-28 11:48:58

标签: git ssh shared-hosting

所以我一直在网上搜索如何在我的共享主机上安装git,但我仍然不知道。

1 个答案:

答案 0 :(得分:1)

从以下位置获取最新的git版本 的 https://github.com/git/git/releases

登录到您的主机并在您的主文件夹中,运行以下命令..

curl -O http://github.com/git/git/archive/v1.8.3.3.tar.gz(put the latest vesion of git)
tar zxvf git-1.8.3.3.tar.gz
cd git-1.8.3.3
./configure --prefix=/home/$USER --with-curl --with-expat
make -i
make -i install
echo 'PATH=$PATH:$HOME/bin' >> $HOME/.bashrc
source $HOME/.bashrc

然后键入git版本,它将提供 git版本1.8.3