Git Changelists & Log
Git tool windows for VS Code, inspired by PyCharm's: a commit graph with branches and commit details in the
bottom panel, and a Commit view whose file list works like VS Code's Source Control view, with
changelists and per-file checkboxes added. It uses VS Code's theme
colors and native menus, and sits next to VS Code's own Source Control view without changing it.
What you get
Git tool window (bottom panel, tab Git → Log; command Git Changelists & Log: Show Log)
- Branches pane: HEAD, Local, Remote and Tags, with branch names grouped into folders on
/
and ahead/behind counts. A click jumps to the branch's commit, a double-click shows only its
history, and a right-click gives Checkout, New Branch, Compare with Current, Rebase Current
onto This, Merge into Current, Push, Rename and Delete.
- Commit graph: colored lanes, branch and tag labels (
origin & main when both point to
the same commit), author, date and hash. Only the visible rows are drawn, so large histories
scroll smoothly, and older commits load as you scroll.
- Filters: text or hash, branch, user and path. Show History and Show History for
Selection open the log filtered on a file or on the selected lines.
- Commit menu (right-click): Copy Revision Number, Checkout Revision, New Branch, New Tag,
Cherry-Pick, Revert Commit, Undo Commit (HEAD only), Reset Current Branch to Here (soft, mixed,
hard or keep), and Interactively Rebase from Here.
- Several commits: Ctrl/Cmd+click adds or removes a commit, Shift+click or Shift+arrows
select a range, Ctrl/Cmd+A selects all loaded commits. Right-click the selection for Compare
the Two Commits (two selected, older on the left), Copy Selected Hashes, Cherry-Pick Selected
Commits (oldest first) and Revert Selected Commits.
- Details pane: the changed files grouped by folder. Double-click a file for its diff;
right-click for Compare with Local, Open Repository Version and Show History. The message,
author, committer and parents (click a parent to jump to it) are shown below the files.
Branches and Compare (activity-bar icon Git Changelists & Log, below Commit)
While git runs (a refresh, fetch, pull, push…), the Git Changelists & Log activity-bar icon
shows the turning arrows, like VS Code's Source Control, and a progress bar runs at the top of
the Commit view and of the Log.
Branches view: HEAD, Local, Remote and Tags, with names grouped into folders on /. HEAD
comes first, as in PyCharm, with the current branch (or "detached at ") next to it.
The current branch has a check mark, and ↑/↓ show commits to push and to pull. A click shows
the branch's commit in the Log.
- Right-click HEAD: New Branch from Here, New Tag…, Compare with…, Show History, and Push when
a branch is checked out.
- Hover buttons: Checkout and Compare with Current.
- Right-click: Checkout, New Branch from Here, Compare with Current, Compare with…, Show
History, Rebase Current onto This, Merge into Current, Push, Rename, Delete.
- Several selected (Ctrl/Shift+click): the right-click menu changes to Compare Selected
Branches (two branches or tags) and Delete Selected… (one confirmation; the current
branch is kept).
- Title bar: Fetch, Pull, New Branch, Checkout…, Compare Branches…; Show Log
and Refresh are under
….
Compare view (PyCharm's Compare with Current), shown once you compare two branches,
tags or revisions:
- the commits Only in each side, newest first. A click shows the commit in the Log;
right-click for Copy Revision Number or Cherry-Pick;
- the Files changed from the first tip to the second, with Git status colors. A click opens
the diff; right-click for Compare with Local;
- title bar: Swap Sides, Refresh, Close.
The Log toolbar has the same New Branch, Checkout and Compare buttons. Its branch menus offer
Compare with Current and Compare with….
Commit tool window (activity-bar icon Commit; command Git Changelists & Log: Commit…)
One section: the commit message box at the top and, right under it, the changed files grouped
into PyCharm's changelists with a checkbox per file. Git status colors and a change count on
the activity-bar icon work as in VS Code's Source Control view.
- The Commit box shows how many files are ticked. Amend fills in the last message. Use
Commit (Ctrl+Enter in the message box) or Commit and Push….
- Click a file to open its diff against HEAD (a conflicted file opens in the merge editor).
Click a changelist to fold or unfold it. Arrows, Home/End and Enter work too.
- Row buttons appear when you hover a row: Open File and Rollback (Delete for an
unversioned file). A changelist row has a Rollback button for all its files.
- Several files: Ctrl+click and Shift+click (Shift+arrows) select several rows. Menus,
buttons and checkboxes on a selected row act on the whole selection.
- Roll back several files at once: select them, then use a row's Rollback button, the
Rollback button in the view title, the context menu, or Ctrl+Alt+Z. Rollback asks for
confirmation. Added files are unstaged and kept on disk, and unversioned files are left alone.
- Changed files are grouped into changelists, plus Unversioned Files. New changes join
the active changelist. Drag files onto a changelist (its header or one of its files) or use
Move to Another Changelist…. Changelists are stored per workspace; Git does not know about
them.
- A checkbox on each file chooses what gets committed, whatever is staged; the Git index is
left alone. Files in the active changelist are ticked by default. Ticking a changelist ticks
all its files (Space ticks the selected rows).
- Right-click a file for Show Diff, Open File, Show History, Move to Another Changelist,
Rollback, Delete or Add to .gitignore; a changelist for Set Active, New, Edit, Rollback or
Delete Changelist. The message box keeps Cut / Copy / Paste.
Remote and merge requests (GitLab, including self-hosted instances, GitHub and Bitbucket)
- Open in Browser opens the page on the remote's web host:
- a branch or tag: right-click it in the Branches view or the Log;
- a commit: right-click it in the Log or the Compare view;
- a file: Git → Open File in Browser in the editor or Explorer menu, or the editor tab menu.
The selected lines are highlighted. The link points to the current commit when it is pushed,
else to the upstream branch. Copy Link to File copies the link instead;
- a file changed by a commit: right-click it in the Log's details;
- the repository and its merge request list: Git Changelists & Log: Open Repository in
Browser and Open Merge Requests in Browser (also in the Branches and Merge Requests view
menus).
- Open Merge Request (branch menus, the commit menu, the palette for the current branch) opens
the open merge request of the branch, or the merge requests that contain a commit. With no
merge request, it offers to create one.
- Create Merge Request… opens the service's "new merge request" page for the branch. When the
branch was never pushed, it offers to push it first. On GitHub and Bitbucket these are pull
requests.
- The remote used is the upstream of the current branch, else
origin, else the first remote.
Commits and branches the remote does not have yet get a warning before the page opens.
Merge Requests view (activity-bar icon Git Changelists & Log, collapsed at first; Git
Changelists & Log: Show Merge Requests)
- The open merge requests (GitLab) or pull requests (GitHub) of the remote, as one list. Each
row shows the number, the author, current branch for the one opened from the branch you are
on, and the status (draft, conflicts, pipeline running…). Hover a row for the branches, dates,
labels, reviewers and the description.
- Sort By… (title bar) orders the list by last update (default), creation date, creator,
assignee, title or number; the choice is remembered and shown next to the view's title.
- Expand a merge request to see its changed files, and click a file for its diff. The extension
fetches the merge request's head and target branch into your repository with
git fetch;
your branches and working tree are not touched.
- Hover buttons: Open in Browser and Checkout Branch. Right-click for Copy Link and Show
in Compare View, which lists its commits and files.
- Title bar: Refresh, Sort By…, Create Merge Request…, Open Merge Requests in Browser. Sign In
/ Set Access Token… and Forget Access Token are under
….
- Credentials (first match wins):
- an access token set with Sign In / Set Access Token…. It needs the
read_api scope on
GitLab, and is kept in VS Code's secret storage;
- on github.com, VS Code's GitHub sign-in;
- the
glab (GitLab) or gh (GitHub) command-line tool, when it is installed and logged in
to the host.
- The view only reads from the server (GET requests). Bitbucket is supported for the browser
links, not for this view.
Issues view (activity-bar icon Git Changelists & Log, under Merge Requests, collapsed at
first; Git Changelists & Log: Show Issues)
- The open issues of the remote (GitLab or GitHub; pull requests are left out), as one list.
Each row shows the number, the author and the labels; confidential issues have a lock. Hover
a row for the dates, assignees, milestone, due date and the description.
- Sort By… (title bar) orders the list by last update (default), creation date, creator,
assignee, title or number; the choice is remembered, separately from the Merge Requests view.
- Hover buttons: Open in Browser and Create Branch…, which suggests GitLab's branch name
<number>-<title> (12-fix-the-login-page), creates it from the current branch and checks it
out. Right-click for Copy Link.
- Title bar: Refresh, Sort By…, New Issue… (the service's "new issue" page), Open Issues in
Browser.
Sign-in and credentials are the same as for the Merge Requests view (on GitLab the token's
read_api scope covers issues). Read-only, like the Merge Requests view.
Worktrees view (activity-bar icon Git Changelists & Log, collapsed at first; Git
Changelists & Log: Switch Worktree…)
- Every working tree of the repository (
git worktree list), with the branch or detached commit
it has checked out. The one the views show has a check mark; the main working tree, locked
worktrees and worktrees whose folder is gone (missing) are marked. A click shows its commit
in the Log.
- Hover buttons: Open (Switch to Worktree) and Open in New Window. Switching to a worktree
that is already a folder of the workspace changes what the views show; otherwise the window
reopens on its folder.
- Right-click: Open, Open in New Window, Add to Workspace, Show in Log, Copy Path and Delete
Worktree…. Delete asks for confirmation, offers to delete the branch too, and asks again
before deleting uncommitted changes or untracked files. The main worktree and the one open
here cannot be deleted. Several selected worktrees can be deleted at once (also with the
Delete key).
- Title bar: New Worktree… and Refresh; Switch Worktree… and Prune Missing Worktrees are
under
….
- New Worktree… (also Check Out in New Worktree… on a branch in the Branches view or the Log)
checks out a local branch, a remote branch (creating its tracking branch), or a tag or
revision (on a new branch or a detached HEAD). A branch already checked out elsewhere gets a
new branch. The suggested folder is
<repo>.worktrees/<branch> next to the main working tree.
- Checking out a branch that another worktree has checked out offers to open that worktree.
Everywhere
- Branches popup: click the branch name on the right of the status bar. It offers Update
Project, Commit, Push, New Branch, Checkout Tag or Revision, and every branch with its
actions.
- Annotate: right-click the line numbers, or Git → Annotate with Git Blame in the editor
menu. It shows the date and author per block of lines, shaded by age. Hover a line for the
commit and a link to it in the log. Unsaved edits show as Not committed yet.
- Pull (fetch the upstream's remote, then merge or rebase per setting, local
changes stashed around it), Fetch and Push… (with Force Push, which uses
--force-with-lease). Fetch and push go through VS Code's Git extension, so you are asked
to sign in like in Source Control.
- Tags: New Tag… (Branches view title, Log toolbar, commit and branch menus) suggests the
next name from the previous tags: the same prefix with today's date for
PREFIX_YYMMDD
tags (the KNIME repositories' convention), or the next patch version for v1.2.3. Give a
message for an annotated tag, or leave it empty for a lightweight one; then push it in one
click. Push Tag and Push All Tags; deleting a tag offers to delete it on the remote too.
- Stash Changes… and Unstash Changes in the Commit view's
… menu.
Every command that changes the repository is logged in the Git Changelists & Log output channel.
When git fails, the extension recognises the problem and offers the way out:
| Problem |
What you get |
| Local changes or untracked files in the way |
Stash and Retry (stash, run, unstash; PyCharm's smart checkout), or Force Checkout |
| Conflicts (merge, rebase, cherry-pick, revert, unstash) |
Resolve Conflicts in VS Code's merge editor, or Abort |
| Merge, rebase, cherry-pick or revert in progress |
Commit view: a Merge Conflicts group, a notice, and Continue / Skip / Abort / Resolve buttons; right-click a conflicted file for Accept Ours / Theirs |
| A hook refused the commit or the push |
A report beside the editor (pre-commit results table, ruff / linter problems linked to their lines, full output), the problems in the Problems panel, and Commit Again (picks up files a formatter fixed), Skip Hooks… |
| Authentication failed, unknown SSH host key |
Retry, or Run in Terminal to sign in or accept the key |
| Push rejected (the remote has new commits) |
Pull and Push, or Force Push (with lease) |
| Force push refused (stale info), remote refused (protected branch, server hook) |
The reason given by the server, Fetch |
| No upstream branch / upstream deleted on the remote |
Push and Track, Track Remote Branch… / Push to Recreate It, Stop Tracking |
| No remote, detached HEAD |
Add Remote… / New Branch Here…, Checkout Branch… |
| Name and email not set, signing failed |
Set Name and Email… / Retry Without Signing |
Stale index.lock, unrelated histories, empty cherry-pick, existing branch, network |
Remove Lock and Retry / Merge Anyway / Skip It / Check It Out / Retry |
When a pre-commit hook passes, its summary (pre-commit: 5 passed) or its first line
(KNIME state OK: …) shows in the status bar after the commit.
Settings
| Setting |
Default |
|
gitTool.showBranchInStatusBar |
true |
Show the current branch on the right of the status bar |
gitTool.updateMethod |
merge |
merge or rebase for Pull |
gitTool.hostingProviders |
{} |
Service of a remote host when it can't be guessed |
gitTool.hostingProviders maps a host to gitlab, github or bitbucket, for example
{"git.example.com": "github"} for a GitHub Enterprise server. Without an entry, github.com
and bitbucket.org are recognised, and any other host is taken as a GitLab instance.
No keyboard shortcuts are bound by default, because PyCharm's (Ctrl+K, Ctrl+T, Alt+9) clash with
VS Code's. Bind the gitTool.* commands in Keyboard Shortcuts if you want them.
Install
From the Visual Studio Marketplace: search for Git Changelists & Log in the Extensions view, or run
code --install-extension harrahx3.vscode-git-tool
Each release's .vsix is also attached to the GitHub Releases
(Extensions view → … → Install from VSIX…).
It needs VS Code 1.90 or later with the built-in Git extension enabled. It works in VS Code
connected to WSL.
Develop
npm install
npm run build # or: npm run watch
npm run lint && npm run typecheck
npm test # unit tests (parsers, graph layout, commit/rollback on real repos)
npm run test:browser # the webviews in headless Chromium, with screenshots
npm run test:vscode # integration tests in a downloaded VS Code
npm run package # → vscode-git-tool-<version>.vsix
Press F5 in this folder to start an Extension Development Host.
Layout: src/extension/ holds the extension host (git queries and operations, the two view
providers, commands, annotate), src/webview/log/ and src/webview/commit/ hold the two webview
interfaces, and src/shared/ holds the message types, git output parsers and graph lane layout.
Release: bump version in package.json (npm version X.Y.Z --no-git-tag-version), add a
CHANGELOG.md entry, commit, then push a tag vX.Y.Z. The Publish workflow
(.github/workflows/publish.yml) runs the tests, builds the .vsix, attaches it to a GitHub
Release and publishes it to the Visual Studio Marketplace (Trusted Publishing, no stored token).
License
MIT. The bundled third-party libraries keep their own licenses, listed in
ThirdPartyNotices.txt.
PyCharm and IntelliJ IDEA are trademarks of JetBrains s.r.o. This extension is not affiliated with
or endorsed by JetBrains.
| |