【发布时间】:2021-11-28 16:19:21
【问题描述】:
我正在尝试从brew 安装较旧的git 版本。
我已经安装了git2.33.1
▶ brew info git
git: stable 2.33.0 (bottled), HEAD
Distributed revision control system
https://git-scm.com
/usr/local/Cellar/git/2.33.0_1 (1,508 files, 42MB) *
Poured from bottle on 2021-10-08 at 12:06:00
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb
License: GPL-2.0-only
==> Dependencies
Required: gettext ✔, pcre2 ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.
zsh completions and functions have been installed to:
/usr/local/share/zsh/site-functions
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/git
==> Analytics
install: 198,758 (30 days), 658,960 (90 days), 2,607,801 (365 days)
install-on-request: 194,065 (30 days), 644,952 (90 days), 2,558,858 (365 days)
build-error: 0 (30 days)
我想要(出于某些故障排除目的)旧版本,即2.25.1
为什么似乎没有其他(旧)版本可用?
▶ brew install git@2.25.1
Warning: No available formula or cask with the name "git@2.25.1".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
我也尝试过this旧SO主题的建议,但没有任何运气。
【问题讨论】:
-
可能,brew 维护者只是没有将那个特定的旧版本存储在任何地方。您可能希望直接从源代码构建 Git,而不是使用 brew(或者实际上是“附加”,因为您需要的不仅仅是标准 macOS 开发人员软件)。