Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>JB Commit PanelNew to Visual Studio Code? Get it now.
JB Commit Panel

JB Commit Panel

DrFormat

|
4 installs
| (0) | Free
JetBrains-style Git tool window: Local Changes with the diff in the panel, Commit Changes and Push Commits dialogs, Stash, and a Log with the commit graph, branches and filters.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JB Commit Panel

A JetBrains-style Git tool window for VS Code: Local Changes with the diff right in the panel, Commit Changes and Push Commits dialogs, Stash, and a Log with the commit graph.

Local Changes

  • Changes, Unversioned Files and Merge Conflicts, with file icons from your icon theme and status colors, as a flat list or grouped by directory.
  • Diff preview next to the list: unified or side-by-side, unchanged fragments collapsed, changed words highlighted.
  • The diff's ⚙: Ignore (Do Not Ignore, Trim Whitespaces, Ignore Whitespaces, Ignore Whitespaces and Empty Lines), Highlight Words or Highlight Lines, Show Whitespaces, Show Line Numbers, Use Soft Wraps. Each place (Local Changes, the commit dialog, the diff window, …) keeps its own settings.
  • The diff is editable, like in JetBrains IDEs: type in the current version of the file, or revert one change with its arrow (↶ next to the line numbers in the unified view, » between the sides in side-by-side). The edits go straight to the file, or into its open editor when that has unsaved changes. ⌘Z in the diff undoes them.
  • Commit with Commit File… in the context menu, the Commit button on the toolbar or ⌘K.

The Commit Changes dialog opens above the whole window. Drag it by its title and resize it; next time it opens at the same size. It has:

  • the files, with checkboxes;
  • the commit message, with message history (🕓) and hints;
  • Author, Amend commit and Sign-off commit;
  • Commit Checks;
  • the diff, with a checkbox at each change of a modified file (while whitespace isn't ignored in its ⚙);
  • Cancel and Commit ∨ (Commit and Push… is in its menu: it commits, then opens the Push dialog).

Exactly the checked files are committed, whatever is staged in the index.

Commit message hints, like JetBrains' commit message inspections: a wavy underline where the subject line (the first line) or a line of the body is longer than 72 characters, or where the body starts right below the subject without a blank line; hover it to see why. A thin line shows the right margin. The limits are settings (jbCommitPanel.commitMessage.subjectLength, bodyLength, blankLine); 0 turns a limit off.

Commit Checks run before the commit, on the files being committed. They are off until you turn them on, and are remembered per workspace:

  • Reformat code: formats the changed lines with the formatter VS Code uses for the file (the whole file, if its formatter can only format whole files);
  • Optimize imports: Organize Imports;
  • Cleanup: Fix All, the fixes your linters and language servers can make by themselves;
  • Analyze code: stops on errors anywhere in the files and on warnings in the changed lines, as the Problems view shows them (some language servers, TypeScript for one, report only files open in an editor);
  • Check TODO: stops on TODO and FIXME in the changed lines.

When Analyze code or Check TODO finds something, the commit waits: Review lists what was found and goes to it, Commit Anyway commits. Parts of files (see below) aren't changed by the checks.

Commit part of a file: uncheck a change in the diff and the commit leaves it out. The change is drawn as an outline instead of being filled, and the file's checkbox in the list shows that only part of the file goes in. Your file doesn't change: the left-out changes stay in it as local changes. Click the file's checkbox to check all its changes again; check a change of an unchecked file to commit just that change. Parts of files can't be committed while a merge, cherry-pick or revert waits to be committed.

Select several files with Shift-click or ⌘-click: Commit, Rollback, Add to VCS, Delete, Jump to Source and Copy Path then work on all of them, and Space checks or unchecks them together.

The context menu of a file also has Rollback…, Stash Changes…, Create Patch… and Copy as Patch to Clipboard (unversioned files go in as new ones), Show Diff in Editor, Jump to Source, Show History, Annotate with Git Blame, Local History, Copy Path, Reveal in Finder / Explorer, Add to VCS for unversioned files, Add to .gitignore and Delete… (moves the file to the trash).

The panel's "…" menu has Apply Patch… and Apply Patch from Clipboard…: they show the files a patch changes, then apply it to your working tree without committing anything (what doesn't apply cleanly opens the Conflicts dialog). Manage Remotes… is there too: add a remote, change its name or URL, remove it.

Prefer the commit form inside the panel? Turn on Use non-modal commit interface (jbCommitPanel.nonModalCommit). Quick way to the setting: the panel's "…" menu → Open Settings. The ⚙ next to Amend in the form picks the Commit Checks.

Stash

  • Stash Changes… from the toolbar stashes all local changes, from the context menu only the selected files. Unversioned files are stashed too. Its dialog takes a message and Keep index (what is staged stays staged).
  • The Stash tab lists the stashes; open one to see its files, select a file to see its diff.
  • Apply, Pop, Drop, Show Diff and Clear All on the toolbar and in the context menu. Unstash As… opens the Unstash Changes dialog: Pop stash, Reinstate index (what was staged is staged again), or As new branch.

Push

Push… (⇧⌘K anywhere except the text editor, where ⇧⌘K stays Delete Line) opens the Push Commits dialog above the whole window:

  • on the left, where the branch goes ("feature → origin : feature") and the commits to push. Click the remote to choose another one or to define one. Click the branch after it to push to another branch; a branch the remote doesn't have yet is marked New;
  • on the right, the files of the selected commit, or of all the commits when the branch row is selected. ⌘D or a double-click shows the diff below them;
  • Push tags: all of them, or the annotated ones on the pushed commits (Current Branch);
  • Cancel and Push ∨ (Force Push is in its menu; it asks first and uses --force-with-lease).

⇧⌘K, then Enter pushes right away. A branch without an upstream starts tracking the branch it is pushed to. When the remote has commits your branch doesn't, the push is rejected: choose Merge or Rebase, and the push runs again. Push… is also in the context menu of a branch in the Log.

Push All up to Here… (right-click a commit of the current branch in the Log) opens the same dialog for the commits up to that one: the newer ones stay local.

Branches, Update Project, Pull, Merge

Branches… (the branch icon in the panel's title, the command palette) opens the Git Branches popup, as in JetBrains IDEs: Update Project…, Commit…, Push…, New Branch… and Checkout Tag or Revision… on top, then the local and remote branches and the tags. Favorites come first; ★ on a row marks or unmarks one. A local branch shows ↑ and ↓ for the commits it has to push and to pull. Type to search; Enter on a branch shows what to do with it: Checkout, New Branch from…, Checkout and Rebase onto…, Compare with…, Show Diff with Working Tree, Rebase … onto…, Merge … into…, Pull into … Using Merge or Using Rebase (a remote branch), Update, Push…, Rename…, Delete. To have the current branch in the status bar open this popup, turn on jbCommitPanel.branchInStatusBar.

Update Project… (⌘T in the Git panel, the panel's "…" menu, the popup) brings in the new commits of the current branch's upstream: merge them into it, or rebase it on top of them. The choice is remembered. Your local changes are put aside meanwhile and come back.

Pull… and Merge… (the panel's "…" menu, the command palette) open their dialogs: the branch, and the options of git pull and git merge: --rebase, --ff-only, --no-ff, --squash, --no-commit (and for a merge --allow-unrelated-histories and a commit message). Options that don't go together turn each other off. After a squash merge the commit dialog starts with the message git prepared.

Log

  • Branches on the left: HEAD (Current Branch), Local, Remote and Tags, with a "Branch or tag" search. Click a branch or a tag to jump to its commit (the log loads up to it if it's further down), double-click it to see only its history. Favorite branches have a ★ (master and main at first): mark and unmark them with ★ on the toolbar or in the context menu.
  • The commit graph with branch and tag labels, author and date. More history loads as you scroll.
  • Filters: "Text or hash" (.* for a regular expression, Cc to match case), and the Branch, User, Date and Paths drop-downs: type to search, pick a value, or Select… several branches or users, a period or files and folders; values used lately are under Recent. The button shows the active value, × clears it.
  • Graph Options next to the filters: sort By Commit Date (the default) or Topologically, First Parent, No Merges.
  • Go To Hash/Branch/Tag (⌘F in the log, or the magnifier): the log loads up to that commit and selects it. If the filters hide it, you are offered to reset them.
  • On the right, the changed files and details of the selected commit: message, hash, author, date and the branches that contain it.
  • Double-click a file or a commit to open the commit's diff window: its files on the left, the diff on the right.
  • Select several commits with Shift-click, ⌘-click or Shift+↑ ↓: the files on the right are their changes together, below them the details of each one, and the diff window shows those changes together too.

Branch actions (right-click a branch): Checkout, New Branch from Selected…, Checkout and Rebase onto Current Branch, Compare with Current Branch, Show Diff with Working Tree, Rebase Current Branch onto Selected, Merge into Current Branch, Update, Push…, Rename…, Delete, Mark / Unmark as Favorite. The toolbar next to the branches has New Branch, Update, Delete, Compare, ★ and Fetch.

Tag actions (right-click a tag): Checkout, New Branch from Selected…, Compare with Current Branch, Show Diff with Working Tree, Merge into Current Branch, Push Tag… and Delete Tag (then Restore brings it back, Delete on Remote… deletes it on a remote too). Remote actions (right-click a remote): Fetch, Edit Remote…, Remove Remote….

Compare with Current Branch shows the commits of the branch that the current one doesn't have; ⇄ Swap shows the other way round, × ends the comparison. Show Diff with Working Tree (a branch) and Compare with Local (a commit) open the diff window with every file that differs from your working tree.

Commit actions (right-click a commit): Copy Revision Number, Create Patch…, Show Diff, Compare with Local, Cherry-Pick, Checkout Revision, Reset Current Branch to Here…, Revert Commit, Undo Commit…, Edit Commit Message… (F2), Fixup…, Squash Into…, Drop Commit…, Interactively Rebase from Here…, Push All up to Here…, New Branch…, New Tag…, Go to Child Commit, Go to Parent Commit.

With several commits selected: Copy Revision Numbers, Create Patch… (one file, oldest commit first), Show Diff, Compare Versions (two commits: the diff from the lower one to the upper one, even on different branches), Cherry-Pick (oldest first), Revert Commits (newest first), Drop Commits… and Squash Commits…. Squash Commits… asks for the message and makes one commit at the place of the oldest selected one; the commits between them stay, after it. A cherry-pick or revert that stops on a conflict goes on with the rest of the commits after Continue.

Files of a commit (right-click a file in the changes of the selected commit, or of several selected commits together): Show Diff, Compare with Local, Compare Before with Local, Jump to Source (F4), Open Repository Version, Revert Selected Changes and Cherry-Pick Selected Changes (they change your working tree and commit nothing; what doesn't apply cleanly opens the Conflicts dialog), Create Patch…, Get from Revision (asks first), History up to Here, Copy Path, Copy Absolute Path.

Interactively Rebase from Here… opens a dialog with the commits from the selected one up to the latest, newest first like the log. Mark each one Pick, Edit, Reword, Squash, Fixup or Drop (P, E, R, S, F, D), and move them with ⌥↑ and ⌥↓. Edit stops the rebase right after that commit: the bar above Local Changes says so; change the files, and Continue puts the changes into that commit (it asks first) and goes on. Squash and fixup go into the kept commit below them; with several commits selected, into the oldest of them. The message of a reworded or squashed commit is edited below the list. Start Rebasing runs it. With git's rebase.autoSquash turned on, "fixup! …" and "squash! …" commits start out under the commits they are for.

Fixup… and Squash Into… put your local changes into an older commit. The Commit Changes dialog opens with the message "fixup! " (or "squash! "). Commit and Rebase… (⌘Enter) commits it and opens Interactive Rebase with it already under that commit, so Start Rebasing folds the changes in; Commit in the Commit ∨ menu makes the commit and leaves it for later. A squash adds its message to the commit's message (without the "squash!" line); a fixup keeps the commit's message.

Anything that rewrites history or deletes data asks first. Editing commits that are already pushed warns that the branch will need a force push. The log refreshes by itself when branches, tags or HEAD move.

History

Show History opens a History tab in the Git panel, as in JetBrains IDEs: the commits that changed a file, newest first and following renames (older commits show the name the file had), the file's diff in the selected commit and its message. Find it under Git in the context menu of the editor and of a file in the Explorer, in the menu of an editor tab, on a changed file in Local Changes and in the command palette. Right-click a commit for Compare with Local, Open Repository Version, Revert or Cherry-Pick Selected Changes, Get from Revision, Show All Affected Files (the commit in the Log), Copy Revision Number and more. Enter or a double-click opens the commit's diff window, F4 the file; × closes the tab.

Annotate with Git Blame (the same Git menu) turns on VS Code's own Git blame in the editor, and Local History › Show History opens VS Code's Timeline of the file, Put Label… saves a named Local History entry of it.

Show History for Selection does the same for the selected lines, and History up to Here (a file of a commit in the Log) starts at that commit. Compare with Revision… and Compare with Branch… (Git menu, command palette) open the diff window with the file as a commit of its history or a branch has it against your working file.

Conflicts

When a merge, rebase, cherry-pick, revert or stash stops on conflicts, the Conflicts dialog opens, as in JetBrains IDEs. It lists the files in conflict and what each side did to them: Yours is your branch, Theirs is what comes in (in a rebase, Yours is the branch being rebased). Accept Yours or Accept Theirs takes one side for the selected files, even several at once; a side that deleted the file deletes it. Merge… (Enter, double-click) opens VS Code's three-way merge editor for the file; when you close it, the dialog comes back with what is left. When nothing is left in conflict, the dialog closes and offers to Continue the rebase (cherry-pick, revert) or to Commit… the merge, with the message git prepared.

The dialog opens again from Resolve next to Merge Conflicts in Local Changes, Resolve… in the bar above them, Resolve Conflicts… in the context menu of a conflicted file, and in the command palette.

Rebase, merge and cherry-pick that stop

When a rebase, merge, cherry-pick or revert stops, a bar above Local Changes says so ("Rebasing feature onto main (2/5)") and what to do next: resolve the conflicts (Resolve…), then press Continue (the resolved files are marked resolved for you), or Skip the commit (rebase), or Abort. A merge is finished by committing. The bar also appears when the operation was started outside VS Code, and the same actions are in the command palette.

Keyboard

On Windows and Linux use Ctrl instead of ⌘ and Alt instead of ⌥.

Where Keys Action
Anywhere except the text editor ⇧⌘K Push…: the Push Commits dialog
Git panel ⌘K Commit…: the dialog with the selected files
Git panel ⌥⌘K The same, with Commit and Push… as the default button
Git panel ⌘T Update Project…
Changes list ↑ ↓ ← → Move, collapse, expand
Changes list Shift+↑ ↓, ⌘A Extend the selection, select all
Changes list Space Check or uncheck (in the dialog and in the non-modal mode)
Changes list Enter, F4, double-click Open the file
Changes list ⌥⌘Z Rollback…
Changes list ⌥⌘A Add to VCS (unversioned files)
Changes list Delete Delete… the selected files
Commit dialog ⌘Enter Commit (after Fixup… and Squash Into…: Commit and Rebase…)
Commit dialog ⌥⌘K Commit and Push
Commit dialog Esc or a click outside Cancel; the message is kept for next time
Push dialog Enter, ⌘Enter Push
Push dialog ⌘D, double-click The diff of the selected file
Push dialog F4 Jump to Source
Push dialog Esc or a click outside Cancel
Diff F7, ⇧F7 Next or previous change
Log ↑ ↓ PgUp PgDn Select a commit
Log Shift+↑ ↓, Shift-click, ⌘-click, ⌘A Select several commits, all of them
Log Enter, ⌘D, double-click The commit's diff window
Log ⌘C Copy the commit hash (several: separated by spaces)
Log F2 Edit Commit Message…
Files of a commit F4 Jump to Source
History ↑ ↓, Enter, ⌘D, F4 Select a commit, its diff window, Jump to Source
Branches Enter, double-click Show only this branch
Branches Delete Delete the branch
Diff window Esc Close
Edit Commit Message ⌘Enter, Esc OK, Cancel
Interactive Rebase P, E, R, S, F, D (Delete) Pick, Edit, Reword, Squash, Fixup, Drop
Interactive Rebase ⌥↑ ⌥↓ Move the selected commits
Interactive Rebase ⌘Enter, Esc Start Rebasing, Cancel
Conflicts Enter, double-click Merge… the focused file
Conflicts Shift+↑ ↓, Shift-click, ⌘-click, ⌘A Select several files to accept
Conflicts Esc Close

Requirements

VS Code 1.90 or newer and git. The dialogs and the diff window open above the window in VS Code versions with modal editors (the workbench.editor.useModal setting); otherwise they open as editor tabs. Push, fetch and pull go through VS Code's built-in Git extension, so they sign in the way VS Code does.

License

MIT. The licenses of the bundled open-source libraries are in ThirdPartyNotices.txt, which comes with the extension.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft