VSCodeTips

VSCodeTips is a community of amazing vscoders

We're a community that shares tips & tricks on how to best leverage VS Code

Create new account Log in
loading...
Cover image for What does it mean when my file name is red and has an exclamation point?

What does it mean when my file name is red and has an exclamation point?

Lucia Cerchie
Updated on ・1 min read

Screen Shot of package-lock.json in red with exclamation point

It looks bad, but never fear!

You need to save, commit or add the changes in the file, and make sure there are no errors. I like to think of it as a kind of 'wet paint' sign. Work's not complete yet!

So for the example where my package-lock.json is red and has a !, I can either:

git add package-lock.json
git commit package-lock.json
Enter fullscreen mode Exit fullscreen mode

or

 git revert HEAD [main COMMIT_REF] Revert "prepend content to package.json" 1 file changed, 1 deletion(-)
Enter fullscreen mode Exit fullscreen mode

(I also need to check for errors in my code.)

If you need more info on git revert (I certainly did, it's cool how it saves your commits so you don't lose anything), there's a helpful article on Atlassian.

Discussion (4)

Collapse
terabytetiger profile image
Tyler V. (he/him)

I don't know that I've ever seen the "!" indicator for this?

My VS Code uses the letter indicators outlined here: stackoverflow.com/questions/483041...

I guess there must be a setting to change between these options? 🤔

Collapse
cerchie profile image
Lucia Cerchie Author

I think I had unsaved changes I was trying to commit, whereas your changes are saved but not committed-- I just noticed the article I cited was for Tortoise, my bad! I'll edit it.

Collapse
terabytetiger profile image
Tyler V. (he/him)

I don't think that's it? If I have unsaved changes all I'm seeing is a filled circle on the tab - and if I save changes, then modify the file more without saving I see both an "M" and the filled circle indicating unsaved changes 🤔

I'm very confused as to why there's a difference 😅

Thread Thread
cerchie profile image
Lucia Cerchie Author

strange! Maybe someone will see our conversation and help us out.