Miguel Frutos
Miguel Frutos

Reputation: 11

Decoration/Marker "U" in Visual Studio doesn't change to "A" after staging ("git add .") the file

This is my first question in StackOverflow (hello!). :)

The thing is that with my IDE, Visual Studio Code, I can not change the "U" of untracked for an added file.

  1. After I include a new file into my repository, the file is untracked by git (and therefore marked with a 'U').
  2. Then I open the Terminal on VS Code and initiate git in the proper route with git init.
  3. After that, I stage it with the git add . command, the marker it is supposed to change to "A" but it is not the case.
  4. Even when I commit the changes with git commit -am "first commit" the file is still displayed as "U"...

What it is strange to me is that in the Terminal the changes, modifications, uploadings... are identified by git without any inconvenient, it is just in the Visual Studio User Interface that this thing happen.

Picture1: enter image description here

My Attempts:

  1. I have tried to reinstall VS Code but it is still having the same issue (I have a Mac with intel chip).
  2. Tried with other repositories/projects... same issue.

Any help is well received. Thank you for your time!.

Upvotes: 1

Views: 312

Answers (1)

Miguel Frutos
Miguel Frutos

Reputation: 11

Using the Source Control the file can be added to the stage as well, it has the same result that running a git add (file) command but using VS Code user interface. See the image below.

  1. Press the Source Control button.
  2. Press the (+) button to stage the file.

enter image description here

Upvotes: 0

Related Questions