Visual Studio code displays a gutter line to indicate some files have changed. When you stage the changes, the line disappears.
This is what unstaged changes looks like:
This is what it looks like after running git add .
:
Is there someway to make vscode highlight staged changes in the gutter?
The Source Control icon in the Activity Bar on the left will always indicate an overview of how many changes you currently have in your repository. Selecting the icon will show you the details of your current repository changes: CHANGES, STAGED CHANGES and MERGE CHANGES.
On windows hold down Ctrl + Shift and on mac Command + Shift, then press the key P.
Not natively (VS Code) or with GitLens (GitHub repo)
As you probably know (or written), there is a feature request
Right now, I know which lines are not staged (green for new, blue for edited) and maybe when I commit locally, highlight those lines in a different color (purple?) to represent "committed but unpublished."
But for now, you need to switch to the version control part of VSCode to see what is about to be committed:
There you can inspect staged changes to be committed.
Note: there is an uncommittedColor
, but I don't know if it references staged or unstaged changes, or how it is used.
GitLens 6.2 does mention gitlens.gutterUncommittedForegroundColor
themable color, but I don't see it anymore in my current 8.3 GitLens version.
The Microsoft/vscode
60389 opened by the OP includes for now:
When you're editing a file in Git, there are three versions of it:
- HEAD
- Index
- Working tree
So, there are two possible diffs to show:
HEAD <> Index
Index <> Working Tree
We currently show gutter decorations for
Index <> Working Tree
.
Since the file which is open in the editor is always Working Tree, it doesn't make any sense to showHEAD <> Index
changes in the gutter, since none of those two files is Working Tree.
Aug. 202&: Lefty adds in the comments:
In recent GitLens version its possible to temporarily enable this highlighting by pressing Ctrl+Shift+P and entering
gitlens.toggleFileChanges
.It disappears on first edit though :(.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With