版本问题,最直接的解决办法就是重新编辑安装git吧:

设置用户名和email

git config --global user.name "zhucaixiang"

git config --global user.email "xxxx@qq.com"

生成ssh key

ssh-keygen -t rsa -C "xxxx@qq.com"

1. 下载:# wget -O git.zip https://github.com/git/git/archive/master.zip

2. 解压:# unzip git.zip

3. 进入git目录:# cd git-master

4. 编译安装:

autoconf

./configure --prefix=/usr/local

make && make install

5. 最后别忘了删掉旧的git,并把新版本的git建立软链接到/usr/bin/git

rm /usr/bin/git

ln -s /usr/local/bin/git /usr/bin/git

在linux中文件与软件一般都是安装在到/usr/share和/usr/local中了,如果我们需要查看软件安装路径linux为我们提供了查看命令,whereis 就可以帮我查找文件安装路径在哪里了。

代码如下

复制代码

[root@localhost ~]# whereis eclipse

会显示:

代码如下

复制代码

eclipse: /usr/bin/eclipse /usr/lib/eclipse /usr/share/eclipse

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐