I am on Windows 11 and trying to learn the cmd prompt. I cant use code .
and git commands at the same time. If I want to use code .
, I have to path it first. After pathing code .
, git commands don't work. So, I path them and as a result, I can't use code .
. This goes on like this. Is there a solution for this? Thank you all
Asked
Active
Viewed 35 times
-1

Aydin Apaydin
- 1
- 1
- 1
-
3What do you mean by `I have to path it first`? – tkausl Feb 05 '22 at 03:10
1 Answers
1
I am on Windows 11 too, and when installing Visual Studio Code, there is an option to add it as a path. Also, with git. To do this manually, you can use this method:
- Open Start menu and search(type) "Environment Variables" then select "Edit my system environment variables".
- Once the system properties comes up select "Environment Variables...".
- On "User variables for ****", select Path and click "Edit".
- Click new and in the text box enter "C:\Users[user]\AppData\Local\Programs\Microsoft VS Code\bin". Replace [user] with your username for your C:\Users.
- Click OK.
- Now close the "Edit environment variable" window and select "Path" in "System variables" and click "Edit".
- Click "New" and then enter "C:\Program Files\Git\cmd".
- Click OK.
Once you have done the above steps both binaries are added to path.

Andrew
- 375
- 3
- 10