我在 openSUSE 版本 12.2 上。我的 git 似乎安装在 中/usr/lib
。
rnx@linux-sh2d2:~> git --version
git version 1.7.10.4
rnx@linux-sh2d2:~> which git
/usr/bin/git
rnx@linux-sh2d2:~> cd /usr/bin/
rnx@linux-sh2d2:/usr/bin> ls -l git
lrwxrwxrwx 1 root root 18 Jan 10 01:23 git -> ../lib/git/git-add
我已经做了一个zypper remove
。现在当我说它zipper remove git
显示:
Loading repository data...
Warning: Repository 'openSUSE-12.2-Update' appears to outdated. Consider using a different mirror or server.
Reading installed packages...
Package 'git' is not installed.
'git' not found in package names. Trying capabilities.
No provider of 'git' is installed.
Resolving package dependencies...
Nothing to do.
但使用which git
或git --version
我得到的结果与前面提到的相同(上面)。
我的目的是更新 git。我尝试克隆:
git clone https://github.com/git/git
它说:
fatal: destination path 'git' already exists and is not an empty directory
我知道它不是空的。
我做了一个zypper search git
。结果是:
S | Name | Summary | Type
--+----------------------------+------------------------------------+-----------
| cgit | A web frontend for git repositor-> | package
| cgit | A web frontend for git repositor-> | srcpackage
| clucene-git | Open Source C++ Search Engine | srcpackage
| clucene-git-debugsource | Debug sources for package clucen-> | package
| git | Fast, scalable, distributed revi-> | package
| git | Fast, scalable, distributed revi-> | srcpackage
| git-arch | Git tools for importing Arch rep-> | package
i | git-core | Core git tools | package
i | git-cvs | Git tools for importing CVS repo-> | package
| git-daemon | Simple Server for Git Repositories | package
i | git-email | Git tools for sending email | package
i | git-gui | Grapical tool for common git ope-> | package
| git-remote-helpers | Python package for remote helper-> | package
i | git-svn | Git tools for importing Subversi-> | package
i | git-web | Git Web Interface | package
| gitg | Git repository viewer | package
| gitg-lang | Languages for package gitg | package
i | gitk | Git revision tree visualiser | package
| glade-catalog-gitg | Git repository viewer -- Catalog-> | package
| hg-git | Mercurial Plugin for Communicati-> | package
| libgit2-0 | C git library | package
| libgit2-devel | C git library | package
| libgitg-1_0-0 | Git repository viewer -- Library | package
| libgitg-devel | Git repository viewer -- Develop-> | package
| perl-Algorithm-CheckDigits | Perl extension to generate and t-> | package
| perl-Config-GitLike | Git-compatible config file parsing | package
| python-GitPython | Python Git Library | package
| python-git-review | Tool to submit code to Gerrit | package
| python-git-review | Tool to submit code to Gerrit | srcpackage
| python-gitdb | Git Object Database | package
| qgit | Graphical Git Repository Viewer | package
| stgit | Stacked GIT - Source Code Manage-> | package
| vim-plugin-gitdiff | Show git diff in a split window | package
我究竟做错了什么?
答案1
可以看到,git-core
已经安装完毕,这是 git 工具的最小包。尝试一下zypper remove git-core
。