Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>gfileNew to Visual Studio Code? Get it now.
gfile

gfile

Nikolay

|
1 install
| (0) | Free
Git file history for the whole file or the selected lines.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

gfile

Git history for one file — browse commits that touched the active or selected file and compare any revision with your working copy.

Compatible with Visual Studio Code and Cursor.


Features

Commits list Side bar lists commits for the whole file (git log --follow) or only for a selected range of lines (git log -L).
Diff vs working tree Side‑by‑side diff: snapshot of the file in a commit on the left, your current file on the right.
Reliable restore After restarting the editor or reopening the folder, the last diff is reopened using a filesystem snapshot for the left side, which avoids the stuck loading spinner often seen with the built‑in git: document provider.
Per workspace Saved “last diff” state is scoped to the current workspace and does not leak into other projects.

Requirements

  • Git on your PATH, and the file must belong to a Git repository.
  • Open a folder (workspace) that contains the file.

Install

In the editor open the Extensions view, search for gfile, then click Install. Reload the window if the editor asks you to.


Usage

  1. Open a file inside a Git repository.
  2. Choose how to query history:
    • Whole file: Command Palette (Cmd+Shift+P / Ctrl+Shift+P) → gfile: file history, or right‑click the file in Explorer / editor tab title.
    • Selected lines: select one or more lines in the editor → right‑click → gfile: selection history (the command is also in the palette when text is selected).
  3. The File commits view opens in the activity bar. In selection mode the view shows Lines n–m in the header. Click a commit to run gfile: open diff vs working copy and compare with your working tree.

Default keyboard shortcuts (change them under Keyboard Shortcuts if needed):

OS Shortcut
macOS ⌥⌘H with focus in the text editor (also ⌥H per keybinding)
Windows / Linux Alt+H

На русском

gfile показывает историю Git для одного файла: список коммитов в боковой панели и сравнение версии из коммита с рабочей копией. После перезапуска или повторного открытия папки последний diff восстанавливается через снимок файла на диске, чтобы не зависать на бесконечной загрузке у схемы git:.

Установка: откройте представление «Расширения», найдите gfile и нажмите «Установить».

Как пользоваться: откройте файл из репозитория → gfile: история файла или выделите строки и gfile: история выделения из контекстного меню редактора → в Коммиты файла выберите коммит для сравнения с рабочей копией.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft