LoginSignup
1
1

More than 1 year has passed since last update.

VSCodeにて仮想環境上(venv)でgitコマンドが認識されない

Last updated at Posted at 2022-07-03

VSCodeにて仮想環境上(venv)でgitコマンドがエラーになり認識されない

windows
VSCode
venv

gitはWindows版をダウンロードし、インストール済み

venv仮想環境上でgitコマンドが認識されない。

> git
git : 用語 'git' は、コマンドレット、関数、スクリプト ファイル、または操作可能なプログラムの名前として認識されません。名前が正しく記 述されていることを確認し、パスが含まれている場合はそのパスが正しいことを確認してから、再試行
してください。

原因

gitインストール時に、VSCodeを選択しなかったからっぽい。

対策

VSCodeを選択してgitの再度インストール実行。VSCode再起動で、gitコマンド通りました。
image.png

> git
usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--super-prefix=<path>] [--config-env=<name>=<envvar>]
           <command> [<args>]

These are common Git commands used in various situations:
1
1
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
1