0

I try to write on vscode terminal git init and take this error :

The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spellin g of the name, or if a path was included, verify that the path is correct and try again.

on my cmd when it works . i install git and put path in environment variables correctly and I checked from settings of vscode enabled git. so what should i do to work the command git on vscode terminal.

2 Answers 2

3

In the Command Palette (Ctrl+Shift+P) type:
Create New Integrated Terminal
Now you have to change the terminal (Powershell -> Git Bash) by clicking on the tab (the down arrow) in the upper right corner of the Integrated Terminal Window:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

It seems you are working on Windows.

If you work in Windows, the terminal executed in vscode is not the same as the terminal provided by git, what would explain the described behavior.

The vscode terminal executes the power shell terminal, meanwhile the terminal provided by git executes a bash-like terminal (the most common terminal used in linux) with all commonly used tools.

Under 'vscode > settings > Features > Terminal' you can change this behavior

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.