-1

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

1 Answers1

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:

  1. Open Start menu and search(type) "Environment Variables" then select "Edit my system environment variables".
  2. Once the system properties comes up select "Environment Variables...".
  3. On "User variables for ****", select Path and click "Edit".
  4. 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.
  5. Click OK.
  6. Now close the "Edit environment variable" window and select "Path" in "System variables" and click "Edit".
  7. Click "New" and then enter "C:\Program Files\Git\cmd".
  8. Click OK.

Once you have done the above steps both binaries are added to path.

Andrew
  • 375
  • 3
  • 10