Windows
File Explorer
12 min read
Versora connects to Windows File Explorer in three ways:
- "Open with Versora" in the menu of folders: opens that folder's repository in a tab.
- The "Versora" submenu in the menu of files: opens a file's blame, history or diff straight in the app.
- The status icons: badges over files and folders that show, right in File Explorer, what's modified, in conflict, untracked, committed or ignored.
All three are created by the installer, which asks before writing each one. Both menus exist in both installation modes (just for you or for all users); the status icons, only in the installation for all users. The first one can also be turned on and off later from the app itself. They all appear in Preferences › Windows integration, which shows what's installed on this machine.
With this item, you right-click a folder (or the background of an open folder) and choose Open with Versora. That folder's repository opens in a Versora tab. It's the quickest way to go from File Explorer to the app without looking for the project on Home.
- In File Explorer: right-click a folder, or the background of an open folder › Open with Versora. On Windows 11, the item is under Show more options, unless the classic menu is enabled.
- To turn it on or off:
- on Home, the File Explorer menu: on / File Explorer menu: off button;
- in Preferences › Windows integration, the "Open with Versora" in the folder menu setting, with the On / Off switch;
- during installation, the installer asks: "Add "Open with Versora" to the folder context menu in File Explorer?".
- Open Home (Ctrl+T) and click File Explorer menu: off.
- In the Add to the File Explorer menu window, read the explanation and click Add. The notice "Done: "Open with Versora" is now in the folder menu." confirms it.
- In File Explorer, right-click a repository folder, for example
D:\dev\loja-web, and choose Open with Versora. - The repository opens in a tab. If Versora was already open, the existing window receives the folder: no second window opens.
You can click a subfolder of the repository (such as D:\dev\loja-web\src\api): Versora goes up
to the repository root and opens the whole repository.
When turned on from the app (Home or Preferences), the item is written to your user's registry,
without asking for administrator rights, in two keys (in the installation for all users, the
installer writes the same keys under HKLM, for the whole machine):
HKCU\Software\Classes\Directory\shell\Versora (click on a folder)
HKCU\Software\Classes\Directory\Background\shell\Versora (click on the background of an open folder)
Each key has the item's text, the Versora icon and the command, which is the same as the command line:
"<Versora folder>\versora.exe" "%V"
%V is the folder you clicked. Opening from the terminal with versora <folder> gives the same
result (see Command line).
The item's text is in the interface language at the moment you turn the item on. The installer writes the text in its own language (the Windows display language; on Windows in any other language, English) and, on every update or reinstall, rewrites in that language the item that already exists in the part of the registry it installs to (your user's, in the installation just for you). Changing the app's language later doesn't rewrite the item: to update the text, turn it off and on again.
Turn it off with the same Home button (File Explorer menu: on, which asks for confirmation in Remove from the File Explorer menu) or with the Preferences switch. Uninstalling Versora also removes the item. There's no Ctrl+Z for this change, because it isn't a git operation.
- "Done: "Open with Versora" is now in the folder menu.": the item was written.
- "Item removed from the File Explorer menu.": the item left your user's registry.
- "The item is still in the menu: it was installed for all users and only the installer (or an administrator) can remove it.": the installation was done for the whole machine, and the item is in the machine's registry. Ask the administrator or run the uninstaller.
- "Couldn't read the Windows registry.": the app couldn't read the item's state. Outside Windows, or without access to the registry, the Home button doesn't even appear.
- "Windows refused the registry change." and "Couldn't access the Windows registry: …": the write failed. This is usually a security policy on the machine.
- "The folder isn't a Git repository: …": you used the item on a folder that isn't inside a repository. To create one there, see Open, clone and create.
Caution
A silent installation (with no questions) doesn't add the item, because it has no way to ask. The automatic update doesn't ask either: it asks none of the three questions (this item, the file submenu and the status icons), only rewrites the items that already exist and doesn't create the others. In both cases, turn this item on later from Home or from Preferences; the submenu and the icons only come back by running the installer yourself.
- Preferences › Windows integration › "Open with Versora" in the folder menu.
- The Windows integration page can be hidden or made read-only by the company policy, with
the id
windows. When read-only, it shows "This page is set by your company and is read-only.". See Policy keys.
With the submenu, right-clicking any file in a repository takes you straight to the Versora screen you want, without opening the app and looking for the file. There are four items, named in the installer's language:
| Item | What it opens |
|---|---|
| Blame | The file's blame: who changed each line and in which commit. |
| File history | The commits that touched the file, following renames. |
| Diff with the last commit | What changed in the file since the last commit, combining what's staged and what isn't. |
| Open the repository in Versora | Just opens the file's repository (or activates its tab). It's separated from the first three by a line. |
- In File Explorer: right-click a file › Versora › the item. On Windows 11, the submenu is under Show more options (or Shift+F10).
- The submenu appears when a single file is selected.
- Installation status: Preferences › Windows integration › Versora submenu on files group › Submenu on files.
- Palette (Ctrl+P): "Windows File Explorer integration" opens that Preferences page.
- In File Explorer, open the repository folder, for example
D:\dev\loja-web\src. - Right-click
carrinho.ts. On Windows 11, click Show more options. - Choose Versora › Blame.
- Versora opens the repository (or activates its tab, if it's already open), waits for it to
load and shows the blame of
carrinho.ts.
If Versora is already open, the screen opens in its window. If it's closed, it opens with the request already in place.
- Blame and File history only work on files tracked by git. On a new (untracked) or ignored file, the app warns you and doesn't open the screen.
- Diff with the last commit compares the file on disk with the last commit (HEAD):
- on a file with changes, it shows the staged and unstaged changes together;
- in a repository with no commits yet, it shows what's staged;
- on an untracked file, it shows the whole file as new;
- on a file with no changes or an ignored one, it warns you and opens nothing.
- Open the repository in Versora opens the repository and stops there.
If the repository belongs to another Windows user (git's "dubious ownership" warning), Versora asks whether you trust the folder, as when opening the repository from Home, and then goes on with the request.
The installer writes the submenu to the Software\Classes\*\shell\Versora key (in the user's
registry, for the per-user installation; in the machine's, for the installation for all users).
Each item calls the executable with an action and the file:
"<Versora folder>\versora.exe" --explorer blame "%1"
"<Versora folder>\versora.exe" --explorer log "%1"
"<Versora folder>\versora.exe" --explorer diff-head "%1"
"<Versora folder>\versora.exe" --explorer open "%1"
Nothing from the repository is executed: Versora only opens the repository and the screen.
The submenu belongs to the installer: the app neither creates nor removes it. To remove it, uninstall Versora. To put it back, run the installer again and accept the question "Add the "Versora" submenu to the file context menu in File Explorer?". On an update or reinstall, the installer only rewrites the submenu that already exists, with the executable's new path and the names in its own language, without asking again.
- "Blame works on files: … is a folder." and "Diff works on files: … is a folder.": these items are for files only.
- "… isn't tracked by git: there's no blame or history.": the file is new or ignored. Commit it first.
- "… is ignored by git (.gitignore): there's no diff.": the file is in
.gitignore. - "… has no changes since the last commit.": there's nothing to show in the diff.
- "The repository took too long to load. Once it shows up, use the Explorer menu on … again": the repository took more than a minute to open (very large repositories, or on a network drive). Wait for the tab to load and repeat.
- "File or folder not found: …": the file was deleted or moved between the click and the opening.
- "The path is inside the .git folder, which is git's database: …": git's internal files have no blame, history or diff.
- In Preferences, "Not installed" with the explanation "The Versora installer creates the submenu: run it again and accept the question about the files menu.".
- "The submenu opens a different executable (…). Run this version's installer to fix it.": the registry points to another copy of Versora (for example, an old installation folder).
- Preferences › Windows integration shows whether the submenu is Installed for this user, Installed for all users or Not installed. The Check again button rereads the registry.
- The page can be hidden or made read-only by the company policy (id
windows). See Policy keys.
Status icons are badges File Explorer draws over the files and folders of repositories. With them, you see right in File Explorer what changed, without opening Versora.
| Icon | Meaning |
|---|---|
| conflict | The file is in conflict (a stopped merge, rebase or cherry-pick). |
| modified | The file has changes, staged ones included. |
| untracked | The file is new and git doesn't track it yet. |
| committed | The file is the same as in the last commit, with no changes. |
| ignored | The file is ignored by .gitignore. |
A folder shows the worst status of what's inside it. For example, a folder with a modified file and another one in conflict shows the conflict badge.
The icons are fast and don't execute anything from the repository. For security, git filters and fsmonitor are ignored in this computation.
- In File Explorer, on the files and folders of repositories, once installed.
- Preferences › Windows integration › Status icons (overlays) group: the legend, what's installed and which icons fit in Windows' slots.
The icons exist only in the installation for all users (per machine). The installer asks for the mode on the Choose Users page: choose Install for anyone using this computer, which requires administrator rights (see "Just for you or for all users" in Install Versora). File Explorer only reads status icons registered for the whole machine, which is why the installation just for you doesn't include them.
- Run the installer from an administrator account and choose Install for anyone using this computer.
- Answer Yes to the question "Show git status icons (modified, committed, conflict, untracked, ignored) on repository files in File Explorer?". It only appears in that mode.
- Sign out and back in to Windows: that's when File Explorer loads the icons.
Without the icons, Preferences tells you why:
- "This Versora was installed just for you: status icons require the installation for all users, because File Explorer only reads them when registered for the whole machine.": reinstall for all users (uninstall the just-for-you installation first).
- "Not installed: Versora is installed for all users, but the status icons weren't accepted during installation. The installer asks again if you run it once more for all users.": run the installer again, in the same mode, and answer Yes.
- "Not installed. File Explorer only reads status icons registered for the whole machine: they require the installation for all users (the installer asks for the mode).": appears when the app can't tell how it was installed (for example, a copy of the executable outside the installer).
For IT
The per-machine installation requires administrator rights. It writes the File Explorer extension,
the five classes and the status icon entries to the machine's registry (HKLM). A silent
installation doesn't turn the icons on. See Deployment in the company.
Windows shows at most 15 kinds of status icons and keeps 4 for itself. That leaves 11 slots for all the programs on the machine, handed out in alphabetical order of the name each program registers. OneDrive and Dropbox put spaces at the start of their names to get ahead and usually take several slots. Whatever is past the first 11 isn't shown.
Versora has 5 icons, in this order of priority: conflict, modified, untracked, committed and ignored. If there aren't enough slots, the last ones are the first to disappear.
The Status icon slots on this machine group lists every program that registered icons, in the order Windows considers them, with in a slot or no slot on each one. Versora's rows appear as "Versora: conflict", "Versora: modified" and so on.
- Open Preferences (Ctrl+,) › Windows integration.
- In the Status icons (overlays) group, read the summary, for example "Only 3 of the 5 Versora icons fit in Windows' slots. Not shown: committed and ignored.".
- In the Status icon slots on this machine group, see who takes the slots before Versora.
- To free up slots, turn off the icons of programs you don't use, in their own settings (OneDrive, for example), or ask the machine's administrator.
- Click Check again to reread the registry.
- "All 5 Versora icons fit in Windows' slots.": all good.
- "Only … of the … Versora icons fit in Windows' slots. Not shown: …": some of the icons are outside the 11 slots.
- "No Versora icon fits in Windows' slots: the programs listed before it take them all.": free up slots as in step 4.
- Without the icons installed, the app makes a prediction: "On this machine, all 5 Versora icons would fit in Windows' slots.", "On this machine, if installed today, only these would fit in the slots: …" or "On this machine, no Versora icon would fit in the slots: the programs listed below take them all.".
- "The registered extension no longer exists (…). Reinstall Versora.": the registry points to a file that was deleted.
- "Newly installed icons show up after you sign out and back in to Windows (that's when File Explorer loads them).": the installer doesn't restart File Explorer.
- "No program has registered status icons.": the slot list is empty on this machine.
The icons go away when Versora is uninstalled. The app only reads the registry and never writes anything in this part.
- Preferences › Windows integration › Status icons (overlays) and Status icon slots on this machine.
- Page id for the policy:
windows. See Policy keys.
- Command line: the same requests from the terminal.
- Blame and File history.
- Diff.
- Install Versora.
- Deployment in the company.