How to interpret the blue pad lock icon when using Git in Solution Explorer – 063

This blue pad lock icon got me the first time I opened a Git-based solution. At first I thought, “wait a sec… I just created this repo and solution, why are these files locked??” Anyone who has used Visual Studio for a while knows what I’m referring to.

tl;dr – when using Git, the blue pad lock icon means “file is unchanged,” but why didn’t they update the tooltip? In TFVC, SlnExp uses “Checked-in” but in Git, SlnExp uses “Checked in” (no dash), so why not change the words?

For non-windows readers who are interested in what TFVC (a centralized VCS) looks like or those who want more context, here’s a brief overview of what a Solution looks like under Team Foundation Version Control (aka TFS, aka VSO, aka VSTS, etc.)

Using Team Foundation Version Control in Solution Explorer

When you first create a project, you’ll notice that the files have a green + icon, indicating that this file is newly added, but not checked into source control. 

Newly added file to TFVC

And after you’ve check-in your new files,

Team Explorer - Pending Changes window showing "check in"

you’ll now see the blue pad icon

Checked-in icon showing in Solution Explorer

where you can now Right Click to “check out” your file or just simply start editing to “check out” your file.

Checked out to me icon in Solution Explorer

Using Git in Solution Explorer

Let’s pause for a second and consider the workflow of Git being DVCS. So “check in” and “check out” states don’t directly map. But Visual Studio users are used to icons have certain meaning. My guess (and this is just my guess, considering I haven’t been on the team in ages) is that they went with the existing set of check-in and check-out icons, hence mapping their semantic meaning to the Git states. Sure, it’s a little strange at first (as mentioned above), but then you adjust and go on with your life.

For example, this is a Git repo with `git status` that has nothing to commit and working tree clean.

git repo saying "checked in" in Solution Explorer

So although we’re supposed to interpret this as “unchanged”, it’s interesting that the tooltip doesn’t have the dash between Checked and In. At first when I started writing this blog post, I figured SlnExp was using the exact same icons and tooltips, but clearly something is different in a Git repo. I tried having only changes locally versus pushing up to GitHub, but that doesn’t add the dash back.

So despite the missing dash, I’ll adjust and go on with my life 🙂

One thought on “How to interpret the blue pad lock icon when using Git in Solution Explorer – 063

Leave a comment