LoginSignup
1
0

More than 3 years have passed since last update.

Git not found. Install it or configure it using the 'git.path' setting.

Posted at

はじめに

MacOSをアップデート後にVSCodeでgitを使用できなくなっていました。
右下にダイアログが出てきてGit not found. Install it or configure it using the 'git.path' setting.と表示されていました。

Gitバージョン確認

バージョン確認したところ、下記のようなエラーが発生していました。

$ git --version
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

command line toolsのインストール

これでインストールすることでエラーを回避できるようなので下記コマンドを実行

$ xcode-select --install

このソフトウェアは、現在ソフトウェア・アップデート・サーバから入手できないため、インストールできません。
と表示されてしまった場合は、手動でインストールします。

手動でcommand line toolsのインストール

下記ページから自分のxcodeのバージョンに合わせてダウンロードします。
https://developer.apple.com/download/more/

今回はXcode 12のものをダウンロードしました。

スクリーンショット 2020-10-30 0.37.09.png

ダウンロードが完了したら実行してインストーラを起動します。
流れに従ってインストールを完了できればgitを使用できるようになります。

動作確認

Gitのバージョン確認

$ git --version
git version 2.24.3 (Apple Git-128)

VSCodeを再起動することで、左側のツールバーのSOURCE CONTROLの箇所も動作するようになりました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0