2

I'm using Visual Studio Code in Windows 10 and also have Git installed.

I have encountered two issues:

  1. I have tried to perform Git commands on the "command palette" (as shown on many VSCode tutorials) but VSCode is not recognizing any commands. I ended using the "integrated terminal" using bash.exe to clone my repository and checkout master. That did the trick and now I can see my project under the Explorer icon.

    Now that I have files and VSCode sees them if i try to use again the "command palette" to checkout or pull or commit it is not seeing my repository or branches or master. I have to go back and use the "integrated terminal".

    Why is the "command palette" not working?

  2. If I edit any of my files under the Explorer icon that I previously cloned and checkout the changes are not shown under the Git icon.

    But I've noticed that if I make changes to the settings.json (VSCode preference file) it shows under the Git icon that changes have been made and it asks me if I want to commit the changes.

    Why is it that VSCode is not tracking or showing the changes I've made on my own files and only track the changes on its own files?

1 Answer 1

1

Visual Studio Code "Version Control" page mentions:

Visual Studio Code has integrated Git support for the most common commands.

Note: VS Code will leverage your machine's Git installation, so you need to install Git first before you get these features. Make sure you install at least version 2.0.0

So make sure first Git for Windows is installed and in your %PATH% before launching Visual Studio Code.

Open VS in the root folder of your Git repo. As mentioned:

You can open VS Code in a sub-directory of a Git repository. VS Code's Git services will still work as usual, showing all changes within the repository, but file changes outside of the scoped directory are shaded with a tool tip indicating they are located outside the current workspace.

The OP fmora adds in the comments:

I need to open the folder via VSCode in the File menu and it works

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

7 Comments

so i have git for windows installed and in my %path%. In regards to opening VSCode in the subdirectory of my Git repository. Does that mean i have to move the VSCode executable (Code.exe) to my repository folder?
@fmora which git do you have? (git version)
git version v2.11.1
@fmora Looks good: your VisualStudio Code should detect it automatically
but your second comment says that i need to open VSCode in a subdirectory of my git repository. Does that mean i have to move entire folder Microsoft Visual Studio Code there?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.