'Terminal Git Status showing different than Visual Studio status

I've been at this for a couple of days and I can't figure this out.

When I run git status on my terminal, it's giving me a different result than what my visual studio 2022 shows me. I think this all started when i added git lfs to my repo using brew so it doesnt track the larger files i have.

For example, in my terminal, it's showing: enter image description here. Usually they show the same files always and never have an issue.

but then on the same branch in visual studio 2022, it's showing, it's showing this:

enter image description here

so far, I've tried:

  1. Restarting my computer and visual studio(I had to try)
  2. Using the sync button (next to the pushbutton) in visual studio.
  3. Running git remote update on my terminal

I can't find anything else on SO to try.

Any and all help or direction is appreciated!



Solution 1:[1]

Check your .gitattributes files; since you added git lfs, it tracks the large file extensions with the .gitattributes file. That may be the reason why Visual Studio is not tracking those files, but your git terminal does.

Solution 2:[2]

There is a bug which i also face in visual studio. Sometimes the VSCode cannot track the files which are updated. what you can try is update the visual studio to see if the bug is fixed or not.

Mine was resolved by updating the VS.

PS: try using GitLens for a broader view of git.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeremy Caney
Solution 2 kshitiz saini