JB Commit PanelA 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
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:
Exactly the checked files are committed, whatever is staged in the index. 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…, Show Diff in Editor, Jump to Source, Copy Path, Reveal in Finder / Explorer, Add to VCS for unversioned files, Add to .gitignore and Delete… (moves the file to the trash). Prefer the commit form inside the panel? Turn on Use non-modal commit interface ( Stash
PushPush… (⇧⌘K anywhere except the text editor, where ⇧⌘K stays Delete Line) opens the Push Commits dialog above the whole window:
⇧⌘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. Log
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. The toolbar next to the branches has New Branch, Update, Delete, Compare and Fetch. 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…, 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, 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. 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, Reword, Squash, Fixup or Drop (P, R, S, F, D), and move them with ⌥↑ and ⌥↓. 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 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. Rebase, merge and cherry-pick that stopWhen a rebase, merge, cherry-pick or revert stops on conflicts, a bar above Local Changes says so ("Rebasing feature onto main (2/5)") and what to do next. Resolve the conflicts, 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. KeyboardOn Windows and Linux use Ctrl instead of ⌘ and Alt instead of ⌥.
RequirementsVS 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 LicenseMIT. The licenses of the bundled open-source libraries are in ThirdPartyNotices.txt, which comes with the extension. |