一旦我编译并安装了 git 的选定版本,我如何强制共享主机使用我的版本?

Once I compile and install chosen version of git, how do I force the shared hosting to use my version?

Compiler error - msgfmt command not found when compiling git on a shared hosting

继续

在设法制作并安装最新的 git 后,如何强制 cpanel 共享主机使用我的版本?

现在,我希望服务器响应

/home/<ME>/bin/git

当我运行which git

SO,Post 安装,二进制文件存放在

/home/<ME>/bin/bin/

因为,我用

编译

make -i prefix=/home/<ME>/bin all

问题

PATH 查找不是递归的。

解决方案

  • 可选,将所有 git 二进制文件移动到 /home/<me>/bin/

    下的子目录中
  • 只需添加/home/<ME>/bin/

    的所有子目录

到当前路径。里面 .~/.bash_profile

并做

source ~/.bash_profile