Gitwright
A fast Git log for VS Code with a commit graph, and history editing you can do with the mouse: squash, fix up, reword, reorder and drop commits with a right-click or by dragging one commit onto another.
Gitwright lives in the bottom panel next to the terminal. It uses the Git already installed on your machine, works offline and collects no data.

Highlights

- Combine commits with drag and drop. Drop a commit onto another one to fold it in (fixup). Hold Alt (⌥ on macOS) while dropping to squash and edit the combined message. Drop between two commits to move it there.
- Squash or fix up any selection. Select commits with Ctrl/⌘-click or Shift-click, even ones that aren't next to each other, then right-click → Squash Commits….
- Fix the commit you meant to fix. Stage your changes, right-click an older commit → Fixup Local Changes into This Commit. Done.
- Undo everything. Every history change ends with an Undo button. Deleted a branch or tag by mistake? Restore is right there too.
- Your work is safe. Uncommitted changes are stashed and re-applied automatically. Gitwright warns before rewriting commits that are already pushed, offers a force push (with lease) afterwards, and stops if the branch moved while you were deciding.
Features
Git log
- Commit graph with coloured lanes, branch and tag labels, and a marker for branches that are in sync with their remote.
- Loads large histories quickly: 1,000 commits at a time, more as you scroll.
- Filters: message or hash (with regex and match case), branch or range such as
main..feature, user, date, and paths. View options: first parent only, hide merges, topological order, highlight your own commits or the current branch.
- Branches pane: local branches grouped by folder, remotes, tags, favorites, and ahead/behind counts. Click a branch to jump to it, double-click to show only that branch, right-click for everything else.
- Details pane: changed files (click for a diff, double-click to keep it open), the full message with clickable links and hashes, parents, author and committer, and which branches contain the commit.
- Select several commits to see their combined changes.
- Resize the Author, Date and Hash columns by dragging their header edge; double-click the edge to reset it.
- Opens in the panel or as an editor tab (Open Git Log in Editor), with several repositories in one workspace.
- Adapts to the space it gets: the details move below the list when it gets narrow, and you can drag the Git Log tab into the side bar.

Edit history
Right-click a commit (or several) on the current branch:

| Action |
What it does |
| Edit Commit Message… |
Rewords any commit, not just the latest one. |
| Fixup into Previous Commit |
Folds the commit into its parent and keeps the parent's message. |
| Squash into Previous Commit… |
The same, but you edit the combined message. |
| Fixup / Squash Local Changes into This Commit |
Adds your staged changes (or all changes, if nothing is staged) to that commit. |
| Squash Commits… / Fixup Commits |
Combines all selected commits into the oldest one. |
| Drop Commit(s) |
Removes commits and their changes. |
| Interactively Rebase from Here… |
Opens the rebase editor for all commits from here up to the newest one. |
| Undo Commit |
Undoes the latest commit and keeps its changes staged. |
The rebase editor shows the newest commit at the top, just like the log. Pick an action per row from the dropdown, the toolbar or a single key (Pick, Reword, Edit, Squash, Fixup, Drop). U unites the selected commits into one. Reorder by dragging or with Alt+↑/↓. The message pane always shows the message the commit will end up with.

If a rebase, merge, cherry-pick or revert stops for conflicts, a banner at the top of the log offers Resolve Conflicts, Continue, Skip Commit and Abort. When a rebase stops for an Edit, make your changes and click Continue; staged changes are added to the commit for you.
Everyday Git
- Commits: checkout, new branch or tag, cherry-pick, revert, reset (soft, mixed, keep, hard), push everything up to a commit, rebase onto a commit, compare with your working tree, compare two commits, create a patch, open on GitHub, GitLab or Bitbucket, browse the repository at that revision.
- Branches: checkout (a remote branch gets a local tracking branch), new branch from here, checkout and rebase onto the current branch, compare with the current branch, diff with the working tree, rebase or merge into the current branch, pull with rebase or merge, push, rename and delete.
- Files in a commit: show the diff, compare with your local version, open the version from that commit, get the file from that commit, or revert or cherry-pick just that file's changes.
- Smart checkout: if local changes are in the way, Gitwright stashes them, switches and re-applies them.
- File history: right-click a file in the Explorer or an editor tab → Show History. Renames are followed.
- History for selected lines: select lines in an editor, right-click → Git → Show History for Selection.
- Blame annotations: right-click the line numbers → Toggle Blame Annotations. Newer changes are tinted stronger. Hover a line for its commit, a diff and a link into the log.
Keyboard
| Key |
In the log |
| ↑ ↓ Page Up Page Down Home End |
Move; add Shift to select a range |
| Enter |
Show the changes of the selected commits |
| Ctrl/⌘+C |
Copy the selected hashes |
| Ctrl/⌘+A |
Select all loaded commits |
| Ctrl/⌘+F, or just start typing |
Filter |
| Esc |
Clear a filter field, or reduce the selection to one commit |
In a message dialog, Ctrl/⌘+Enter confirms.
Requirements
- VS Code 1.90 or newer
- Git 2.30 or newer on your PATH (the one VS Code uses)
- VS Code's built-in Git extension must be enabled
Install
Download gitwright-0.1.1.vsix from the latest release, then in VS Code run Extensions: Install from VSIX… and pick the file (or code --install-extension gitwright-0.1.1.vsix).
Run from source
git clone https://github.com/JonasTebben/gitwright.git
cd gitwright
npm install
code .
Press F5. A second VS Code window (the Extension Development Host) opens with Gitwright loaded. Open any Git repository in it and click Git Log in the bottom panel, or run Gitwright: Show Git Log from the Command Palette. After changing code, run npm run compile and reload that window (Ctrl/⌘+R).
Build and install your own build
npm install
npm run install-local
This builds gitwright-0.1.1.vsix and installs it. Reload VS Code afterwards. To remove it again:
code --uninstall-extension JonasTebben.gitwright
If the code command isn't found, run Shell Command: Install 'code' command in PATH from the Command Palette first, or install the .vsix via Extensions: Install from VSIX….
Development
npm run compile # build the extension and the webviews into out/
npm test # build, then run the tests (they create throwaway Git repositories)
npm run package # build a .vsix
src/git.ts contains everything that talks to Git and has no VS Code dependency, so it is tested directly against real repositories. src/commands.ts holds every command, src/log.ts hosts the log webview, and webview/ contains the UI code that runs inside the webviews. There are no runtime dependencies.
See CONTRIBUTING.md for details.
Privacy
Gitwright sends no telemetry. It only contacts the network when you fetch, pull or push, and it does that through VS Code's Git extension with your existing credentials.
License
MIT
| |