Tuesday, February 18, 2020

Git Status on Command Line Does Not Match Git Status in VSCode.

A couple of times recently I ran into a situation where VSCode was showing a lot of untracked files in git but the command line was not. Today when I opened up VSCode, it showed over 60 untracked items while the command line only showed 15. It turned out to be a simple misunderstanding on my part.

To demonstrate, I created a new git project with a new subdirectory called new-dir. Inside of new-dir, I created 3 files.

When I run git status on the command line without any parameters, it collapses new directories into single entries.

Command line example

By examining the git output in VSCode, I see now that it is running the command git status -z -u. The -z just terminates each entry in the list with a NUL instead of LF presumably for better parsing. The -u lists out each untracked file individually. And this makes sense because in the source control window of VSCode, you want to be able to see the diff of each file individually.

View of source control panel in VSCode

1 comments:

Unknown said...

As stated by Stanford Medical, It is really the SINGLE reason women in this country live 10 years longer and weigh 42 lbs less than us.

(By the way, it has absolutely NOTHING to do with genetics or some secret diet and EVERYTHING related to "HOW" they are eating.)

P.S, I said "HOW", not "what"...

CLICK this link to determine if this easy quiz can help you find out your true weight loss possibility

Post a Comment

 
Blogger Templates