V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Conty
V2EX  ›  问与答

VSCode MAC 总是用默认的 git 1.8,即使我已经安装好了最新版,仍然告诉我“You seem to have git 1.8.3.1 installed. Code works best with git >= 2“。

  •  
  •   Conty · May 4, 2021 · 3013 views
    This topic created in 1820 days ago, the information mentioned may be changed or developed.
    ➜ ~ which git
    /usr/bin/git
    ➜ ~ git --version
    git version 2.24.3 (Apple Git-128)

    从来没有安装过 xcode 。

    VSCode 是 1.55.2 。

    已经在 settings.json 里面加了

    "git.enabled": true,
    "git.path": "/usr/bin/git",

    多谢!
    4 replies    2021-05-04 17:58:40 +08:00
    Dragonish3600
        1
    Dragonish3600  
       May 4, 2021
    试了下
    %which git
    /usr/local/bin/git
    %git --version
    git version 2.31.1

    你用 Homebrew 安装一下 git
    Conty
        2
    Conty  
    OP
       May 4, 2021
    @ladypxy
    ➜ ~ brew install git
    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 2 taps (homebrew/core and homebrew/cask).
    ==> Updated Formulae
    Updated 10 formulae.
    ==> New Casks
    tabtopus
    ==> Updated Casks
    Updated 56 casks.
    ==> Deleted Casks
    duckstation

    Warning: git 2.31.1 is already installed and up-to-date.
    To reinstall 2.31.1, run:
    brew reinstall git
    Conty
        3
    Conty  
    OP
       May 4, 2021   ❤️ 1
    对不起诸位老大,这是一个愚蠢的问题。原因是我在用 Remote SSH,而远端服务器的 git 仍然是 1.8 。在将远端服务器的 git 重新 build 成 2.31 之后问题消失。
    Zien
        4
    Zien  
       May 4, 2021 via iPhone
    @Conty 哈哈哈哈哈😂
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5592 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 07:26 · PVG 15:26 · LAX 00:26 · JFK 03:26
    ♥ Do have faith in what you're doing.