Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97400

VSCode displaying freshly cloned files as modified with gutter indicators

$
0
0

I recently had some issues with my local github repository, so I deleted the entire folder (including all the .git files) and cloned a new fresh copy. However, when I open the files in VScode, the code does not match what is on the online github repository. Instead the actual updated code I want is displayed in gutter indicators. The code that isn't in the gutter indicators is an old version of the code. However, if I open the files in another editor not linked to github, it displays the file correctly. I suspect it might be related to a local commit or stash, but I am fairly new to github so I am not sure what to do.

Or possibly a vscode issue?

I tried git revert and hard reset, but so far nothing has fixed it. Also, if I try to save I get a VSCode error: "Failed to save 'filename': The content of the file is newer. Please compare your version with the file contents."

This is an Angular project by the way (not sure if that matters)

EDIT I fixed it. I just completely removed and reinstalled all the add-ons on VSCode. So I guess it wasn't a git issue, just some kind of bug with VS Code

EDIT2 Turns out it didn't fix all of it, because I am still getting some gutter indicators, even though it removed some of them.

EDIT3 I did git rm --cached . -r -f in the local repository and then completely recloned it again. Seemed to remove all the gutter indicators so far...


Viewing all articles
Browse latest Browse all 97400

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>