Gitardo
Commit graph, history and everyday Git operations in a single VS Code panel.

Gitardo has a view in the bottom panel and six in the Source Control side bar of VS Code:
- Graph, in the panel next to the terminal: the commit graph, the references and the commit details, side by side.
- Gitardo Repositories, in the side bar: the repositories of the workspace, each with its worktrees and its submodules under it, and the branch, the files changed and the commits to pull and to push of each.
- Commits, in the side bar under the views of VS Code: the commits of the branch that is checked out, each with whether it is pushed and the files it changed.
- Gitardo Graph, Branches and Stashes, in the side bar too: the same history, references and stashes as the panel, for when it is closed.
- Gitardo Changes, hidden until you ask for it: staging and committing, where VS Code has its own.
See Side bar. Like any VS Code view they can be dragged somewhere else, folded or hidden, and Gitardo: Open Graph in Editor opens the graph as an editor tab, titled Gitardo. So does the Gitardo button in the status bar, which is there whenever the workspace has a repository; like any item of the status bar it can be hidden from the menu a right click on the bar opens. That tab follows the repository chosen, as the panel and the side bar do: choosing another repository or worktree in its toolbar, in the panel, in the Gitardo Repositories view or in VS Code's Repositories view changes them all together. There is one such tab in a window: asked for again, it is brought forward. A tab can also be kept on a repository: Open in a new tab, in the context menu of a row of the Gitardo Repositories view, and Gitardo: Open Repository in a New Tab open one on a repository, a worktree or a submodule, titled Gitardo · api or Gitardo · api › feature/login. It keeps what it shows whatever is chosen elsewhere, the list of the repositories in its toolbar changes that tab alone, and clicking in it changes no other view. Two tabs can show the same repository, each with its own filter, selection and scroll, while the repository is read once for both. The tabs come back when the window is reloaded, the one that follows following and the others on what they showed.
The repository is read when VS Code starts, so a view opens with its graph already there, and is read again as it opens. VS Code itself makes a view only the first time it is shown, which takes a moment once per window; GitHub is asked for the pull requests only once a view is open. For a very large repository, turn off gitardo.readOnStartup in the settings of its workspace: it is then read when the first view opens.
Installation
Search for Gitardo in the Extensions view of VS Code and install it, or run:
code --install-extension RiccardoFilippozzi.gitardo
Gitardo needs VS Code 1.100 or later and git on your PATH. The Marketplace gives you the package for your system, which holds Gitardo's engine, gitardo-engine, the program that reads and changes your repositories; Gitardo runs no git of its own. Without the engine for your system, every view says Gitardo's engine is not available on this system. with Show the log, and so does every command that needs it.
To build it yourself instead, build Gitardo's engine for your system, pack it and install it from the file, here for Windows on x64:
cargo build --release -p server --manifest-path ../rust/Cargo.toml
npm install
npm run package
code --install-extension gitardo-win32-x64-1.4.0.vsix
Reload the VS Code window afterwards. To update, run the last two commands again; to remove it, code --uninstall-extension RiccardoFilippozzi.gitardo.
The walkthrough Get started with Gitardo, which VS Code opens once Gitardo is installed and Welcome: Open Walkthrough… opens again, shows in five steps where the graph and the views are and what to try first: a commit in a tab, a comparison, the blame and worktrees.
Features
Graph

- Commit graph of all branches, remote branches and tags, loaded progressively: Gitardo's engine reads the history as git prints it, the first commits are shown as soon as they are read, and the others are added under them a page at a time without waiting for you to scroll, up to 100,000 commits; past those, the next ones are read long before you get to the end of those shown.
gitardo.graph.pageSize says how many come at a time, 1,000 unless set otherwise. While the rest comes, the last row says Loading more commits…, and the rows, the selection and the scroll position stay where they are.
- In a shallow clone, made with
--depth, the line of the oldest commits fetched goes on under their dot, dashed, and its tooltip says the commits before were not fetched. Once the last of them is read, the last row says The history ends here: this is a shallow clone., with Load more history, which asks how many commits further back, 100 unless you type another number, and runs git fetch --deepen, and Load the whole history, which runs git fetch --unshallow. Gitardo: Load More History and Gitardo: Load the Whole History do the same from the Command Palette while the repository shown is shallow.
- The labels of a commit are outlined in the color of its line in the graph; the branch that is checked out is the one filled in. A row shows as many as fit whole, in their order, and counts the others in
+N: on one line its message keeps up to three fifths of the line, and on two lines the author and the date keep up to a third of the line under the message. Rest the pointer on +N, or on any label of such a row, and the list of all its labels opens under it: a click there selects the commit, a double click checks a branch out, a right click opens the menu of that label, and the pointer on one brings out its history.
- A branch and its upstream of the same name share one label while they are at the same commit: the branch's icon has the cloud of the remote after it, and the worktree's icon before it when another worktree has the branch. So
feature with a cloud is what origin/feature has too, and once one of them moves on, each has its own label again. The context menu of that label ends with what only the upstream has: Add origin/feature to favorites, Copy origin/feature and Delete feature from origin. Put a branch and its upstream on one label in the View menu of the toolbar, or the setting gitardo.graph.combineUpstream, gives them a label each again.
- Once the pull requests are loaded from GitHub, or the merge requests from GitLab, the label of a branch that has an open one ends with its number,
!12 on GitLab, in the color of its checks: passed, failed or running. Hover it for its title, and click it to open it. A remote branch has it on its own label when no local branch tracks it, and its context menu checks it out.
- Gitardo: Check Out Pull Request… picks an open pull request of GitHub or merge request of GitLab, those from forks included, or takes its number, also on Gitea and Forgejo, and checks it out: one from a fork goes into a local branch named
<owner>/<branch>, brought up to its new commits when it is checked out again. Gitardo: Sign In to GitLab keeps a token of the GitLab of the main remote, and gitardo.hosting.selfHosted names a GitLab, Gitea or Forgejo of one's own.
- The commits of a local branch that are not in its upstream yet, what the next push of that branch sends, have a ring around their dot; hover the ring for the upstream. It is what the last fetch saw. While the graph leaves the upstream out, as with Local, nothing is marked.
- Rest the pointer on the label of a branch, remote branch or tag to see its history: the commits it reaches, as far as the graph has loaded them, and the lines between them, keep their colors, and the rest of the graph fades until the pointer leaves the label. The same works on the branches, tags, stashes and worktrees listed in the references beside the graph, and on the branches, tags and worktrees of the Branches view of the side bar, which bring out their history in the graph and in the Gitardo Graph view while they are open. Hold
Shift on a label of the graph to bring out only the commits it has that the branch checked out has not: what merging it, or a pull request of it, would bring.
- Show the author, Show the date and Show the hash in the View menu of the toolbar, or the setting
gitardo.graph.columns, choose what is shown beside the message of each commit, and under it where the graph is narrow: what is left out gives its room to the messages.
- A thin line before the first commit of yesterday, of this week, of last week and of each month before has its name at its end, so that you see how far back you are as you scroll. Separate the days, weeks and months in the View menu of the toolbar, or the setting
gitardo.graph.dateSeparators, takes them away.
- Show only the first parent of merges in the View menu of the toolbar, or the setting
gitardo.graph.firstParent, follows each branch along its own line only: a merge is one commit on it, without the commits it brought in. Each branch still shown has its line, down to where it started.
- Show all commits on one line in the View menu of the toolbar, or the setting
gitardo.graph.oneLane, draws every commit of the graph on one straight line, without lanes, a merge as a ring, in a column one lane wide: a list of the history rather than a picture of its branches. Fold all merges and Unfold all merges are not in the menu while it is on.
- Compact rows in the View menu of the toolbar, or the setting
gitardo.graph.compactRows, on by default, gives each commit of the graph in the panel and in its tabs one line: its labels, its message, then the author, the date and the hash in columns at the right end. Turned off, every view of the graph has two lines to a commit, as Gitardo Graph in the side bar always has: the message, and under it the labels, the author and the date.
- The commit selected brings out its history the same way, less strongly, for as long as it is selected: the commits it comes from and the ones made on top of it, with the lines between them, keep their colors, and the rest of the graph is dimmed. A label under the pointer takes its place until the pointer leaves it. Bring out the history of the selected commit in the View menu of the toolbar, or the setting
gitardo.graph.traceSelected, switches it off.
- Fold the commits it merged into one row, in the context menu of a merge and on the arrow after its message, which shows while the pointer is on the row or the merge is selected, puts the commits that merge brought in under one row, "3 commits of feature", and draws the graph again without them: a click on that row or on the arrow of the merge shows them again, and so does going to one of them from elsewhere. Fold all merges in the View menu folds every merge, and while it is checked it folds the merges loaded later too, as the graph is scrolled or more of the history is read; a merge unfolded by hand stays unfolded. Unfold all merges, or Fold all merges again, shows all their commits again. Each view of the graph keeps the folds of each repository, and whether all merges are folded, while it is hidden, when it is loaded again and after VS Code restarts. The folds are not made among what a search finds. A merge whose commits cannot have one row without breaking the order of the history, as when commits made on top of them are further down than what they come from, stays as it is.
- Scrolled down past the tip of a branch whose line goes on down the graph, its name stays at the top of the list, with an arrow up and in the color of its line: rest the pointer on it to bring out its history, click it to go back up to its tip. The line of a branch that was merged has no name until its tip, which is not known.
- Beside the scroll bar of the graph, marks say where in the commits loaded the one checked out is, in the color of its line, where the one selected is, and where what a search found is.
- With the keyboard on the graph, the arrows go from commit to commit and
Home goes back to the one checked out. Alt+↓ goes to the first parent of the commit selected and Alt+↑ to the commit made on top of it, on its line, or else to the merge that took it in; with Shift too, they go to the next merge down or up. On a merge, ← folds the commits it merged and → shows them again.
- Drag the line between the references and the commits, or between the commits and the details, to change their widths; double-click it to go back to the default. In a panel too narrow to have them side by side the details go under the commits, and the line between the two is dragged up and down the same way, as it is in the Commits view of the side bar. The sizes are remembered per workspace.
- The setting
gitardo.graph.islands draws the references, the commits and the details of the Graph view each as a rounded island, on a ground a step darker than the panel, or deeper in a light theme; in a high contrast theme their borders tell them apart. The toolbar stays above them, its buttons and its search box drawn as islands too so that they show on the ground in every theme, and the gap between two islands is the line you drag to resize them: 8 pixels, 4 in a panel narrower than 900 pixels. In a narrow panel the details under the commits are an island too. It is off by default, and the views of the side bar keep their look.
- The first button of the toolbar puts the references away, to leave their room to the commits, and brings them back. It is remembered too.
- The graph is as wide as its lines need, up to sixteen side by side and a third of the list. With more branches than that open at once it draws the lines closer, and past a point it fades out at its edge rather than push the messages away. Drag that edge to give it less room or more, up to the width at which every line has its place; double-click it to let the graph choose again. This works in the Commits view of the side bar too, and each view remembers its own.
- Uncommitted changes shown as the first row of the graph, also before the first commit of a new repository. Its context menu stashes them, the staged ones alone too, stages or unstages them all, and Discard all changes… takes every file back to the last commit, staged changes included, and deletes the untracked files and folders, after a warning; not during a merge or a rebase, which Abort takes back. Selected, the row opens its files in the details, as a commit does: each has a button that stashes it and one that discards all its changes, staged or not, and a box to tick; with files ticked, the buttons above them stash or discard those, and without, all of them.
- References tree: local branches with ahead and behind counts, remote branches, tags, stashes, worktrees and submodules. Its sections are all closed when VS Code starts, here and in the Branches view; the ones you open stay open until VS Code is closed. From 15 branches and tags on, a filter box appears above it, which lists the names that match best first, and a section with more than 100 entries lists the first 100 and a Show all entry.
- Branches, remote branches and tags are listed by name, or the one committed to last first: Sort by name and Sort by date in the … on the title of the Local, Remotes and Tags sections, or the setting
gitardo.branches.sortOrder. The order is the same for all three, here, in the Branches view and in the lists a branch or a tag is chosen from. A tag made with a message goes by when it was made. While the setting is not set, they are listed by name, or by date when you set VS Code's git.branchSortOrder to committerdate.
- Above them, when there are some, two shorter lists. Recent has the local branches that were checked out last, the latest first and up to five, without the one that is checked out now: where you were before is one double click away. Favorites has the branches you marked with Add to favorites in their context menu, local or remote; they also carry a star where they are listed with the others, and are remembered for each repository of the workspace.
- The references list every branch, remote branch and tag whatever the graph is narrowed to (see Filter by branch): the ones the graph leaves out are dimmed, with an eye at the end of their row, under the pointer, that adds their history to the graph.
- The funnel at the top of the references chooses what they list, apart from what the graph shows: the same list as the button before the search, titled Branches listed, with All, Current, Upstream, Local and Remotes, the branches ticked one by one, and Show local branches, Show remote branches and Show tags at its bottom. While it lists less than everything the funnel is pressed in, and a line above the names says what it lists, with Show all to list everything again; a list it leaves empty, as the remote branches with Local, is left out. It chooses nothing in the graph, and what the graph is narrowed to changes nothing here. The choice is remembered for each repository of the workspace, here and in the Branches view, and a branch ticked that is deleted is no longer listed.
- Commit details with the list of changed files; selecting a file opens it in the VS Code diff editor, and the button next to the count opens the diffs of all of them in one editor. The two buttons before it choose how the files are listed: one after the other, each with its directory beside its name, or as a tree of directories that fold. The choice is remembered. Each file has the icon your file icon theme gives it in the Explorer, here and in every list of files of Gitardo, and each directory of the tree its own when the theme has icons for folders. With the theme set to None there are none. Compare with… in the context menu of a file compares it, as it is in that commit, with the branch, tag, commit or working tree you choose, in the diff editor; a file the commit deleted, as it was before.
- A signed commit has a line Signature under its hash, here and in its tab: what Git says of the signature,
Good, Ada <ada@example.com> in green, a good one Git doubts (an expired key, one whose validity is not known) in the color of a warning, Bad in red, Signed, not checked when Git cannot check an SSH signature without allowed signers, or Cannot be checked when the key is missing; the tooltip has the kind of signature, the key, its fingerprint and its trust. It is checked once the details are shown, for the commit selected alone, and a commit not signed has no line.
- A long message shows its first line and four lines of the rest, so that the files stay in sight under it, and Show more shows it whole, in place.
- A message written as one paragraph with no title, which git takes whole for the subject, gives the title its first sentence, or its first words when the sentence is longer than a title, and goes on under it as text.
- The lines of a message, written to fit in 72 columns, are put back together and cut again at the width of the details or of the tab, where they would otherwise break twice each. Only a line that was cut is joined to the next: lists, indented lines, quotations, fenced blocks, addresses, lines that end early and the trailers at the end stay as they were written. This is only how the message is shown: the commit is as it was written.
- Double-click a commit to read it whole in an editor tab, with what it changed under its message: see A commit in an editor tab. A double click on the label of a branch checks the branch out instead, as it does where the branches are listed.
- Selecting a stash shows what it holds, including the untracked files it took, which git keeps apart from the rest.
- The stashes are in the graph too, each above the commit it was made on, where its date puts it, as long as that commit is in the graph: on the branches shown, and not among what a search finds or in the history of a file. A stash is a square with no fill rather than a dot, joined to its commit by a dashed line, as the uncommitted changes are; its label,
stash@{0}, has a dotted border, and its message is in italics. Its context menu applies, pops, drops it or makes a branch of it, as in the Stashes view. Show stashes in the View menu of the toolbar, or the setting gitardo.graph.showStashes, takes them out of the graph and brings them back.
- Fetch, pull (merge or
--rebase), push, push with --force-with-lease and push with --force.
- Sync, in the menu beside Push and as Gitardo: Sync, fetches, pulls the way Pull does and pushes when the branch is ahead, in one click; a branch with no upstream is published after asking.
- Pull sets the changes that are not committed aside, pulls with your commits put on top of what comes in instead of merged with it, and puts the changes back: it runs
git pull --rebase --autostash. Two settings, both on by default, choose what the button runs: gitardo.pull.rebase adds --rebase and gitardo.pull.autostash adds --autostash. One that is off leaves its option out, and with it the choice to the configuration of Git. The tooltip of the button says the command, and the menu beside it has the four ways to pull whatever the settings say, with the one of the button marked. Among the commands, Gitardo: Pull is the button and Gitardo: Pull (No Options) is git pull alone.
- What
--autostash does: Git sets the changes aside in a stash, pulls, and puts them back. When they no longer fit on what came in, it leaves them in conflict in the files and keeps the stash, named autostash: Gitardo says so and offers the stashes, where it is dropped once the conflicts are resolved. When the pull itself stops on a conflict, git puts the changes back by itself once the merge or the rebase is finished or given up. Untracked files are not touched.
- A local branch that is not checked out can be brought up to date without switching to it: Fast-forward to
<upstream> in its context menu runs git fetch <remote> refs/heads/<remote branch>:refs/heads/<branch>, which fetches the upstream and moves the branch to it in one step. Your files and the branch you are on are not touched. Git only does it when it is a fast-forward, so the entry is offered for a branch that has an upstream and no commits of its own; if the remote has moved in a way that is not a fast-forward since, git refuses and says why. For a branch with commits of its own, check it out and pull. A branch that another worktree has checked out is pulled in that worktree instead, with git -C <worktree> pull --ff-only --no-rebase --no-autostash <remote> refs/heads/<remote branch>, so that its files move with it: the entry is offered only while nothing is uncommitted there, and never rebases or puts anything aside.
- Search across the loaded commits or the whole history: see Search.
- The graph can be narrowed to the branches you choose: see Filter by branch.
- Refreshes on its own when the repository or its files change, including changes made from the terminal or by another program. A commit, a branch, a tag, a stash or a worktree made outside is seen by Gitardo's engine itself, which watches the git folder of each repository and looks at it again every two seconds while a view shows it: it is in the graph about a second later even when VS Code's own file watcher is late or drops changes, as in a large folder of many repositories with their builds. Files git ignores, such as the output of a build, and the files of another worktree inside the repository change nothing; a change to the files keeps the commits of the graph when the history is the same, and VS Code getting the focus reads the repository only when its last read is more than a minute old. Refresh reads everything again, the commits and what is not committed in every worktree. While the commits of a filter, of the branches just chosen or of the next page are read, a bar runs along the top of the list; it stops as soon as those commits are there, even when the files go on changing and the graph is read again behind it.
- While Gitardo has been reading a repository, running an operation, comparing two sides or asking GitHub for its pull requests for more than half a second, Gitardo with a spinning icon shows in the status bar. Its tooltip says what each of those is and for how long it has run, what asked for a read, such as a file that changed, and how many times in a row the repository was read because something changed during each read. A click lists the same, with the way to the commands Gitardo runs in its output channel, and so does Gitardo: Show What Is Running.
- Select several commits with
Ctrl+click (Cmd on macOS) or Shift+click to act on them together: see Several commits at once.
- The toolbar ends with two menus. View, the button with the sliders, has every switch of the graph, each ticked while it is on: what it shows (the local branches, the remote branches, the tags, the stashes, only the first parent of merges), how it draws it (all commits on one line, compact rows, the history of the selected commit, the lines between days, weeks and months, a branch and its upstream on one label, the folds of the merges), and the author, the date and the hash beside each message. … has the actions: it opens the comparison of two branches, tags or commits, the history of the active file, the reflog, the branch cleanup, the remotes, the identity switch and the pull requests. When the toolbar is short of room it gives up only what it must, and takes it back as soon as there is room: first the buttons keep their icons and give up their words, then Refresh is left to the … menu, then the search and the two menus go to a second line, and in a panel narrower still Branch, Stash and Undo are in the … menu. No button is ever out of sight.
- Every item of a context menu, and of the menus under the buttons, shows at its left the icon of what it does, the one Gitardo Desktop draws for it: Copy … the copy icon, Delete … and Remove … the bin, Compare with… the icon of compare, wherever the item is. An item that switches something shows a check while it is on, and the operations that rewrite the history, such as a rebase, a reset or a squash, show no icon.
- In a workspace with several repositories, the first name of the toolbar is the repository shown, and its menu chooses another, as the name of the branch beside it chooses another worktree: see Multiple repositories.
Right-click a commit, a branch, a tag or a stash for the operations that apply to it:
| On |
Operations |
| Uncommitted changes |
Stash, stash the staged changes, stage all, unstage all, discard all, staged changes and untracked files included |
| Commit |
Open in an editor tab, check out (detached), create branch, create tag, create worktree, cherry-pick, revert, merge into the current branch, rebase the current branch onto it, edit its message, split it, interactive rebase, squash into the commit before it, fixup, reset (soft, mixed or hard), compare, bisect, copy its hash or its whole message, body included, copy as patch or save as patch (see Patches) |
| Local branch |
Check out (also by double-click), open in a worktree made for it, or, when another worktree has it, open, rename or remove that worktree (see Worktrees), fast-forward to its upstream, merge, rebase onto, compare with the current branch or with anything else, show it in the graph, show only its history or add it to the ones shown, open or create its pull request, set, change or stop tracking its upstream, create worktree, rename, delete |
| Remote branch |
Check out (also by double-click) as a local tracking branch, or in the local branch of its name when there is one, brought up to it: fast-forwarded, or with its own commits rebased onto it if you choose; when another worktree has that branch, that worktree opens instead; open in a worktree on a local tracking branch, merge, rebase onto, compare, show it in the graph, show only its history or add it to the ones shown, open its pull request, delete from the remote |
| Tag |
Check out (detached), create branch, compare, show it in the graph, show only its history or add it to the ones shown, push, delete, delete from a remote, or here and from a remote |
| Stash |
Apply, pop, create branch, drop |
| Worktree |
Open in the Agents window, open in a new window (also by double-click), open a terminal in it, reveal it in the file manager, show what it has checked out in the graph, rename, copy its path, lock it with a reason or unlock it, remove (with its branch, if you want), prune missing ones |
| Submodule |
Open in a new window (also by double-click), open a terminal in it, reveal it in the file manager, show it in Gitardo, initialize, update to the recorded commit or to the latest of its branch, stage the commit it is on as the recorded one, synchronize URLs, copy its path or URL, deinitialize, remove (see Submodules) |
Check tags on origin, in the … of the Tags list of the references and of the Branches view, or Gitardo: Check Tags on Remote, asks the remote for its tags: a tag it lacks is then marked with a cloud and an arrow, in the list and on its label, with the tooltip Not on origin, one it has on another commit with a warning, and the title of the list says · 2 not on origin. The marks stay until VS Code is closed and follow what Gitardo pushes, deletes or makes; nothing is asked of the remote before you check. Push tags…, in the same … and as Gitardo: Push Tags…, lists the tags the remote lacks, all ticked, and pushes those you keep in one push.
Gitardo: Create Branch with No History…, in the Command Palette and in the … of the Branches view, starts a branch that shares no commit with the others, for the pages of a site: Start with no files takes the tracked files out of the working tree and leaves the untracked ones, Keep the files, staged stages every file as new. Until its first commit the graph shows the other branches, with nothing checked out.
Show in the graph, in the menu of a branch, tag or worktree in the references tree and in the Branches view, opens the graph at its commit. A commit further back than the history is loaded is loaded, and one that the branches shown or a filter leave out shows all of them again, as going to a commit from the reflog does. A click on a reference in the references tree goes to its commit the same way.
Several commits at once
Ctrl+click (Cmd on macOS) adds a commit to the selection or removes it; Shift+click selects every commit between the selected one and the clicked one. A bar above the graph counts them, and offers what the context menu of the selection also does:
- Squash into one makes one commit of them, when they follow one another before
HEAD: see Squash.
- Cherry-pick onto
<current branch> runs a single git cherry-pick with all of them, oldest first whatever the order you clicked them in. Git treats them as one operation: if one conflicts it stops there, and Continue, Skip and Abort in the banner apply to the whole series. Gitardo works out first, each commit on top of the one before, whether the series will stop on a conflict, and if so asks first and names the files. It is not offered when the selection contains a merge commit, which can only be picked on its own.
- Compare these two commits, when two are selected.
- Copy as patch copies them as one patch, oldest first, as
git format-patch makes it; Save as patch…, in the context menu, saves it to a file. Not offered when the selection contains a merge commit, of which git makes no patch.
- Copy hashes.
Undo right after such a cherry-pick takes back all of its commits at once, also when it had stopped on a conflict and you continued it in Gitardo. If you continued it from the terminal, or did something else in between, Undo goes back one commit at a time like after any other commit.
With the setting gitardo.cherryPick.recordOrigin on, each commit that Gitardo cherry-picks, on its own, with others selected or dropped on the commit checked out, ends its message with the commit it was picked from: (cherry picked from commit …), as git cherry-pick -x writes it. It is off by default.
Patches
Copy as patch in the context menu of a commit, or of several selected commits, copies them as one patch, oldest first, as git format-patch --stdout makes it: each commit with its author, its date and its message, for git am to make it again in another repository or on another branch. Save as patch… saves the same patch to a file you choose. Neither is offered on a merge commit, of which git makes no patch.
Gitardo: Apply Patch…, in the Command Palette and in the … menu of the toolbar of the graph, applies a patch from a file you choose or from the clipboard. A patch made by git format-patch, which starts with From <hash>, can be applied As commits, with git am --3way: each of its commits is made again on top of the current branch, with its author and message; or To the working tree only, with git apply --3way, as any other patch is: its changes go to your files and are staged, and nothing is committed. Before anything is touched, Gitardo checks the patch with git apply --check --3way, the commits of a patch all together: when it does not apply, it says why and changes nothing, and when it will leave files in conflict, it names them and asks first. As commits, it needs nothing to be staged, as git am does.
When git am stops on a conflict, the banner shows Continue, Skip and Abort, as for a cherry-pick (see Conflicts). Undo right after the patch takes back all of its commits at once, also when it had stopped and you continued it in Gitardo.
Drag and drop
Drag a commit, or a branch from the graph or the references tree, onto a row of the graph. Rows that accept the drop are outlined, and dropping opens a menu with what can be done:
| Drag |
Onto |
Offers |
| A commit |
The checked-out commit |
Cherry-pick it onto the current branch |
| A branch |
The checked-out commit |
Merge it into the current branch, as Git does by default or in the way you choose, or rebase the current branch onto it |
| The current branch |
Any other commit |
Rebase it onto that commit, or reset it there |
| Another local branch |
Any other commit |
Rebase it onto that commit |
Ways to merge
Merge into <current branch>, in the context menu of a commit, a branch or a remote branch and in the menu of a branch dropped on the commit checked out, runs git merge: a fast-forward when one is possible, otherwise a merge commit, as the configuration of Git says. Merge into <current branch>…, the entry after it, asks which way, as the menu beside Pull has the ways to pull:
- Merge:
git merge, the same as the entry before.
- Merge (no fast-forward):
git merge --no-ff, always a merge commit, even where a fast-forward would do.
- Merge (fast-forward only):
git merge --ff-only, the current branch moves up to the other one with no merge commit. When the current branch has commits of its own, the list says it is not possible, and choosing it says so instead of running git.
- Merge (squash):
git merge --squash, the changes are staged as one and nothing is committed; no merge is recorded, so the other branch does not show as merged. Gitardo says so after, and the commit box of the Changes view, when it is empty, starts from the message Git prepares, which lists the commits brought in. Undo takes the staged changes out again with git reset --merge, also when the squash stopped on conflicts, until something is committed.
Each of them but the fast-forward only says first which files will conflict.
Interactive rebase
Interactive rebase… on a commit opens an editor with the commits from there up to HEAD. Reorder them by dragging, and pick, reword, edit, squash, fixup or drop each one. It is offered when those commits form a single line without merges. A reworded commit gets the subject typed there and keeps the rest of its message.
Edit stops the rebase right after that commit is made, and the banner says so with its subject, such as Stopped at "Add the login page" to edit it. Amend it or commit more, then Continue. Change its files and amend it, give it a new message, or make more commits after it, then Continue: the commits after it are made again on top of what you did, and Continue works as well when you changed nothing. Git goes on only once what you changed is committed, so with changes that are not committed Gitardo says to amend the commit with them, commit them or stash them first. Skip is not offered there, as it would throw away what is not committed and keep the commit anyway; Abort takes the whole rebase back.
Stacked branches and what a rewrite changed
Rebasing a branch, the interactive rebase, editing the message of an older commit, squashing, splitting and the fixup move with it the other local branches on the commits they make again, a stack of branches each started from the one under it: git rebase --update-refs, and what is said after names them. A branch checked out in another worktree stays, and so do all of them with a Git older than 2.38; the plan then says which stay and why. One Undo puts the whole stack back. gitardo.rebase.updateRefs chooses: As git says, its default, which follows Git's own rebase.updateRefs and moves them when that is not set either, Move them or Leave them.
What a rewrite changed opens in a tab of its own, commit by commit, as git range-diff pairs them: the commits made again the same, dimmed, the ones changed, with message or changes, the ones added and the ones dropped, and the count of each. A changed commit opens on its diff of diffs, the lines before in red and now in green; a click on a short hash opens that commit in a tab. It opens from See What Changed on the message after a rebase, an interactive rebase, a fixup or an amend; from What its last rewrite changed in the menu of a branch, and Compare with origin/feature commit by commit when the two have diverged, also in the menu beside Push; from What the force push changed in the menu of a remote branch; from Compare First in the warning of a force push, which pushes nothing; and from the message after a fetch that found the upstream of a branch force pushed.
Edit a commit message
The pencil beside the message in the details, or Edit message… in the context menu of a commit, opens its whole message in a box: Save or Ctrl+Enter gives the commit the new one, Cancel or Escape leaves it as it was. The last commit is amended with git commit --amend --only, which leaves out what is staged. An older one is reworded by an interactive rebase that makes the commits after it again, with new hashes, after asking with the new message in the question; the changes that are not committed are set aside and put back with --autostash. It is offered on the last commit, merge or not, and on the older ones down to the first merge, while no merge, rebase or bisect is under way. When the commit is on a remote branch already, Gitardo says so first: the branch will have to be force pushed. The commit with its new message is selected after.
Squash
Select commits that follow one another and choose Squash into one in the bar above the graph, or Squash N commits into one… in their context menu; Squash into the commit before it… in the context menu of a single commit does it with the commit under it. Gitardo asks for the subject of the commit they become, the subject of the oldest to start with, and puts what their messages say under it, oldest first, as git does; a message whose subject is the one given adds only its body. The commits become one with the changes of them all, by an interactive rebase that makes the commits after them again, with new hashes, after asking with the message they get in the question; the changes that are not committed are set aside and put back with --autostash. It is offered for commits on the line before HEAD down to the first merge, while no merge, rebase or bisect is under way. When they are on a remote branch already, Gitardo says so first: the branch will have to be force pushed. The commit they become is selected after, and Undo takes the whole squash back.
Split a commit
Split this commit… in the context menu of a commit takes its changes out of it into the working tree, unstaged, to commit them again in as many commits as you like; the box of the Changes view starts with its message. It is offered where Edit message… is, except on a merge and on the first commit, and asks first. When the commit is on a remote branch already, Gitardo says so first: the branch will have to be force pushed.
- The last commit is split with
git reset --mixed HEAD~: the branch goes back to the commit before it, and a message says what to do next. Changes that are not committed stay, among its own. Undo right after puts the commit back as it was.
- An older one is split by an interactive rebase that stops right after making it, followed by
git reset --mixed HEAD~; the changes that are not committed are set aside until the end with --autostash. The banner says Splitting "Add the login page": commit its changes in as many commits as you like, then Continue. Continue makes the commits after it again on top of yours, with new hashes. If some of its changes are not committed yet, it asks whether to commit what is left as one more commit, with the message the commit had, or to go back to committing; changes to other files that are not committed are in the way, and it says so. Abort takes it all back, and Undo after the end takes back the whole split.
Fixup
Add staged changes to this commit (fixup) on an earlier commit folds your staged changes into it, or all your changes when nothing is staged. It runs git commit --fixup followed by git rebase -i --autosquash --autostash, so the commit and the ones after it are rewritten. It is offered for the commits an interactive rebase can reach, except HEAD, which Amend already covers. If the changes do not fit the older commit, the rebase stops with conflicts like any other.
Side bar
Gitardo has no icon of its own in the activity bar: its views are in the Source Control side bar, the one VS Code keeps for Git, under Changes and Graph.
Commits lists the commits of what is checked out, newest first, and nothing else: it is apart from the graph, so what the graph is narrowed to, searched for or scrolled to changes nothing here. Its header names the branch.
- Each commit says whether it is pushed. A cloud with an arrow, in color, marks the ones that are not in the upstream of the branch yet: what the next push sends. A plain cloud marks the ones that are. The line above the list counts the first, and the commits there are to pull. A branch with no upstream is compared with every remote branch instead, and in a repository with no remote nothing is marked.
- Click a commit to unfold the files it added, changed, deleted or renamed, and a file to open its diff. Hover a commit for its hash, who made it and when.
- The buttons on a commit open it in an editor tab, with its changes, or show it in the graph. Its context menu also checks it out, creates a branch or a tag on it, reverts it, resets the branch to it and copies its hash or its message.
- Its header has fetch, pull and push, with the other ways to pull and push and undo under ….
- The first hundred commits are read, and Load more commits… at the end reads the next.
Gitardo Repositories, above them, lists the repositories Gitardo found in the workspace, and under each its other worktrees, whether their folders are in the workspace or not, and its submodules, a submodule's own under it. See Multiple repositories.
Three other views show what the graph of Gitardo shows, each on its own:
- Gitardo Graph is the graph without the references: the search, the commits with their lines and labels, and the details of the selected commit under the list instead of beside it. Its header has the buttons the toolbar of the graph has: fetch, pull, push and compare, with the other ways to pull and push, undo and the reflog under …. A list this narrow gives each commit two lines: its message, and under it its labels with their names, who made it and when. The labels that do not fit are counted in
+N, whose list opens under the pointer.
- Branches is the references tree: the recent branches and the favorites, local branches, remote branches, tags and worktrees, with the same context menus and the same funnel, which lists what it chooses whatever the graph is narrowed to. Its header names the branch that is checked out and has the buttons to create a branch and to compare; the title of its Worktrees section has one to create a worktree and a … with the rest of what concerns worktrees: switching, choosing what new ones get, bringing it into the ones there are and pruning the missing ones. Selecting a reference selects its commit in the Commits view and in the graph, if they are open; Show in the graph in its context menu opens the graph at it.
- Stashes lists the stashes, and its header counts them. Unfold one to see the files it holds, untracked ones included, and select a file to open its diff. Apply, pop and drop are on each row; the button in the header stashes all changes.
The sixth, Gitardo Changes, stages and commits: see Changes. VS Code already has a view for that right above, so this one is hidden until you ask for it, with Gitardo: Show Changes or by ticking it in the … menu of the side bar, and stays until you hide it again. The number on the icon of the side bar is the one VS Code counts.
VS Code shows the views an extension adds to this side bar folded: click the header of one to unfold it, or run Gitardo: Show Repositories, Gitardo: Show Commits in the Side Bar, Gitardo: Open Graph in the Side Bar, Gitardo: Show Branches or Gitardo: Show Stashes. It remembers what you fold and unfold from then on. The context menus open inside the view they belong to, so in a short one they scroll: drag the border between two views to give one more room, or fold the ones you are not using.
If you had Gitardo before its views moved here and they are still where they were, View: Reset View Locations brings them over.
A commit in an editor tab
The details beside the graph are a summary. To read a commit whole, open it in a tab of the editor:
- double-click it in the graph, in the panel or in the side bar, or press
Enter on the selected one;
- use the button on its row in the Commits view;
- press the button beside the one that closes its details;
- choose Open in an editor tab in its context menu;
- run Gitardo: Open Commit in Editor… and type a hash, or anything else git turns into a commit.
The tab has the message in full, the labels of the commit, its author, committer and dates, its hash, which a click copies, the line Signature of a signed commit, and its parents, which open in tabs of their own. Show in the graph selects the commit in the graph, and Open in the diff editor opens all of its changes in the editor VS Code has for that.
Under them are the files the commit changed, each with the lines it gained and lost, as a tree of directories or as a list: the two buttons beside the count choose, and the choice is remembered for the tabs opened later. Click a file to open it in the diff editor. Compare with… in the context menu of a file, in the list or on the header of its diff, compares it with the branch, tag, commit or working tree you choose, as in the details.
Show the changes puts the diff of every file in the page, under the list, and Hide the changes takes them away again; the eye on the row of a file shows them and goes to that file. Each diff has the number each line has before and after, and its code in the colors your theme gives it in the editor, under a header that stays in sight while its lines scroll. The arrow on the header folds a diff away, and Fold all and Unfold all do so with all of them. The button at the end of a header opens that file in the diff editor. Once the page is scrolled down, the round button in its corner takes it back to the top.

An image the commit changed, a PNG, a JPEG, a GIF, a WebP, a BMP or an ICO, shows its version before and its version after side by side in place of Binary file., each at most 240 pixels high and half the width of the page, with its size and weight under it, Empty on a side that has none; a click on either opens the two in the diff editor. They are read once the diff is shown, and a version over 10 MB says Too large to show here. An SVG shows its lines, with Show the images on its header for its two pictures and Show the lines back. They are drawn as images, so nothing in an SVG runs or is fetched. A comparison shows its images the same way.
A file changed in more than 800 lines starts folded, and so do the ones that come after 5,000 lines are showing. A commit is sent to its tab up to 20,000 lines: the files past that say so, with a link to the diff editor. A merge is shown against its first parent, as in the details. Ctrl+F searches the page with the search box of VS Code.
Each commit has one tab: asking for it again shows the one it has. A tab stays of the repository its commit is in, also after the other views are pointed at another, and Show in the graph brings them back to it.
Compare
Gitardo: Compare Branches, Tags or Commits…, also the compare button in the headers of the Gitardo Graph and Branches views and the first entry under … in the toolbar, asks for the two sides one after the other. Each is chosen from the list of branches, remote branches and tags, or the Working tree, the files as they are with what is not committed, or typed with Enter a hash or a revision…: a commit hash, or anything else git turns into a commit, such as HEAD~3, v1.0^ or main@{yesterday}. What git does not know is refused while you type. The comparisons opened last are listed first, under Opened before, to open one again as it was.
The comparison opens in a tab of the editor, one for each pair: asking for the same two again shows the tab they have.

- At the top are the two sides. A click on one chooses another branch, tag or commit in its place, the hash beside it opens that commit in its tab, and the arrows between them swap the two.
- Under them, how far apart they are: how many commits the second has that the first has not, and the other way round, and the commit where they diverged, which opens in its tab. Then what merging the second into the first would do, worked out with
git merge-tree without touching anything: fast-forward, merge with no conflict, or conflict in the files it names.
- The box under them narrows the comparison to a file or a folder, its path from the top of the repository: only its files, and only the commits that change it, are listed. The × shows all of them again.
- Since they diverged shows what the second changed since it left the first, from the commit they have in common, as a pull request shows it (
git diff from...to). Everything that differs shows all that differs between the two (git diff from to), what the first changed meanwhile included. Two branches, tags or revisions open with the first, a comparison with a commit given by its hash with the second; one whose histories never meet can only be compared directly.
- Commits lists them: the ones only in the second side, then the ones only in the first, newest first, each with who made it and when; a click opens one in its tab. A commit whose change the other side has too, in a commit of its own, because it was cherry-picked or rebased, says also in that side and is greyed out: it is not what tells the two apart. With more than 2,000 commits between them they are not looked for on the other side, and the newest 2,000 are listed.
- Then the files, as a tree or as a list with the lines each gained and lost: a click opens one in the diff editor, and Show the changes puts the diff of each in the page, in the colors of your theme, as in the tab of a commit. Open in the diff editor opens all of them in one editor of VS Code. The arrow beside a file takes the version the second side has into the working tree and the index (
git checkout <to> -- <file>), or deletes the file when the second side has none, after asking, and with a warning when the file has changes that are not committed, which are lost. Compare with… in the context menu of a file compares it, as the second side has it, with the branch, tag, commit or working tree you choose, in the diff editor; a file the second side deleted, as it was where the comparison starts.
- Copy as patch copies the changes as a patch that
git apply takes, binary files included. Open on GitHub, when the repository is on GitHub, opens the same comparison there: a branch by the name of its upstream there, a remote branch or a tag by its name, anything else by its commit, which GitHub knows once it is pushed. On GitLab, Bitbucket, Azure DevOps, Gitea and Forgejo it is Open on GitLab and so on; Bitbucket, Gitea and Forgejo compare only since the two diverged, so it is there in Since they diverged only.
A side named by a branch, a tag or a revision such as HEAD~1 is followed: when the branch moves, the tab shows where it is now, while the views show its repository. A side given by its hash stays that commit, and so does a branch that is deleted, which the tab says.
The Working tree as a side shows how the files differ from the other side as they are now, what is not committed included, and is read again as they change; its commits are those of the commit checked out. It is compared directly, as files that git does not track are not part of it. Compare with Branch, Tag or Commit… in the context menu of a file or a folder in the Explorer, and of an editor tab, compares it as it is in the working tree with the branch, tag or commit you choose, in a tab narrowed to it.
From the context menu of a commit, branch or tag:
- Compare with
<current branch> compares it with what is checked out.
- Compare with… asks only for the other side, and opens the tab.
- To compare two commits of the graph, select one, then right-click the other and choose Compare with
<commit>, selected before.
Compare with <current branch> and the comparison of two commits show the files that differ in place of the commit details, in the view they were asked from: the graph, or the Branches view under the tree. Selecting a file opens the diff, the button next to the count opens all of them in one editor, Swap reverses the direction, and Open in a tab opens the same comparison in a tab.
Filter by branch
The graph shows every branch, remote branch and tag until you tell it which ones. The button before the search box, three lines that get shorter, says what is shown and opens the list to choose from:
- All, Current, Upstream, Local and Remotes at the top choose with one click: everything, only what is checked out, what is checked out and its upstream, only the local branches, or only the remote ones. Upstream shows at a glance what the branch has that its remote has not, and what there is to pull. Current and Upstream follow you as you switch branch. What is checked out is in the graph whichever you choose.
- Under them, every local branch, remote branch and tag has a tick. Tick the ones to show: the graph changes as you do. From Current, Upstream, Local or Remotes, a tick added or taken away starts from the branches those stand for.
- The box above the list leaves in it the names that contain what you type, the ones that match best first: for
main, main itself, then origin/main, then the names that start with it, as maintenance, then those with a part that does, as release/main-2, and last the others, as domain. Among names that match as well, the order of the list stays. Escape empties it, and closes the list when it is empty.
The references beside the graph and the Branches view are not narrowed with it: they list what their own funnel chooses, and the branches the graph leaves out are dimmed there, each with an eye that adds its history to the graph. gitardo.branches.followGraphFilter is no longer read.
Show local branches, Show remote branches and Show tags in the View menu of the toolbar switch each kind of reference on and off in the graph, the same choice the list makes: Local is the local branches alone, Remotes the remote ones alone. One of them is always left on. They are greyed out while branches are ticked one by one, or Current or Upstream is chosen.
The same can be done from the context menu of a branch or tag, on its label in the graph, in the references and in the Branches view. A branch the graph leaves out is added from its label in the graph, from its dimmed row in the references, or from the list of the button:
| Entry |
Does |
| Show only this history |
Narrows the graph to what that reference can reach |
| Show this history too |
Adds it to the ones shown, when the graph is narrowed already |
| Hide this history |
Takes it out of the ones shown |
| Show all branches |
Shows everything again |
While the graph is narrowed the button is pressed in, and a bar above the commits says to what, with Show all branches to undo it. The choice is one for the graph in the panel and the one of the side bar, and is remembered for each repository of the workspace. A branch that is deleted is forgotten.
What narrows the graph further works inside the branches shown: the history of a file is the one it has on them, and a search finds only their commits. Going to a commit that is on none of them, by its hash or from the reflog, shows all the branches again. The uncommitted changes are listed above the graph only when the commit they are made on is in it.
Bisect
To find the commit that broke something, right-click a commit you know is broken and choose Start bisect: this commit is bad, then mark one that works as good. Git checks out a commit in between; test it and answer with Good, Bad or Skip in the banner. The marks are shown in the graph, and the banner counts how many commits can still be the culprit. When one is left, Gitardo tells you which. End (git bisect reset) goes back to where you started.
Undo
Undo in the toolbar takes back the newest of Gitardo's operations: a commit, amend, checkout, merge, pull, rebase or reset by the reflog; a branch deleted or created, a stash dropped, the conflicts Gitardo resolved, the changes a squash merge staged, a series of cherry-picks or a split from what Gitardo remembered of them. Undoing again takes back the operation before, up to 50 of them, for as long as nothing moves HEAD from outside Gitardo; then, and after a commit made in the terminal, it goes by the reflog, and undoing twice redoes. Right after an operation it cannot take back, a push, a fetch, a tag, a stash or a worktree, it says so instead of taking back the one before. Its tooltip names the operation it would take back. It always shows what it is about to do first.
Previews before risky operations
- Merge and cherry-pick: Gitardo computes the result first, without touching your files, and tells you which files will conflict before it starts.
- Apply a patch: Gitardo checks it with
git apply --check first, and says what keeps it from applying, changing nothing, or which files it will leave in conflict (see Patches).
- Force push: the confirmation lists the commits on the remote branch that are not in yours and would be overwritten, as of the last fetch.
- Apply and pop a stash: Gitardo asks first and says what the stash would stop on: the files that would be in conflict, computed the same way; the files not committed that it changes, for which git refuses it and changes nothing; or an untracked file it took along that is there again, which git leaves as it is while it applies the rest. A popped stash is dropped only when its changes went in without conflicts.
- Delete a branch or a tag: a tag is deleted after asking, and a branch too, saying whether its commits are merged, into its upstream or into the current branch, so that none is lost, or would be lost with it; Undo brings the branch back. A remote that has the tag keeps it.
Search
The box in the toolbar searches in one of five ways, chosen from the list next to it:
| Mode |
Finds |
Runs |
| Loaded |
Message or author among the commits already loaded, highlighted as you type; or the start of a hash, from its fourth character on |
Nothing |
| Message |
Commits whose message contains the text, ignoring case |
git log --grep |
| Author |
Commits whose author name or email contains the text, ignoring case |
git log --author |
| Changes |
Commits that add or remove the text |
git log -S |
| Changes (regex) |
Commits with a changed line that matches a POSIX extended regular expression ([0-9], not \d) |
git log -G |
All modes but the first search the whole history that is shown when you press Enter: every branch, remote branch and tag, or what a filter leaves of them. The two that look inside the changes read every commit and can take a while on a large repository.
The commits found stay where they are in the graph and the others are dimmed. The box counts them, 2/14 when the selected commit is the second of fourteen, and steps through them:
| Key |
Does |
Enter, F3 or the arrow down |
Selects the next match, and starts again from the first after the last |
Shift+Enter, Shift+F3 or the arrow up |
Selects the previous one |
Ctrl+F (Cmd+F on macOS) |
Puts the cursor in the box, from anywhere in the view. While the graph, in the panel or in the side bar, has the keyboard the key is its own, and the editor behind does not open its own search |
Escape |
Empties the box |
A match further back than the history is loaded is loaded when you step to it. What a search of the whole history found is found again when the commits change, so a commit made or fetched meanwhile is counted too; a search stops counting at 5,000 commits and says so with a +.
The funnel in the box, there for every mode but the first, shows the same search the other way: only the commits found, as a list, until you press it again or choose Show all commits. It stays the way you leave it.
Go to a commit
Type the hash of a commit in the box, or the first four characters or more of it, with Loaded chosen. If the commit is among the loaded ones it is highlighted like any other match; if it is not, the box offers Enter ↵, and pressing it asks git for the commit wherever it is:
- further back than the history is loaded: the history is loaded up to it;
- left out by the filter in use, such as the history of a file or of a branch: the filter is removed;
- on no branch or tag, such as a commit lost to a reset or a rebase: the graph shows the history of that commit alone, until you choose Show all commits.
Gitardo: Go to Commit…, also under … in the toolbar and in the header of the Gitardo Graph view, asks for anything git takes for a commit instead: a hash, a branch, a tag, HEAD~3, main@{yesterday}.
File history
Gitardo: Show File History, also in the context menu of the editor, of its tab and of the Explorer, narrows the graph to the commits that changed a file. The graph stays connected, so you still see on which branches the file changed. The same is offered by the clock button next to each file in the commit details.
Renames are followed: Gitardo first asks git for the names the file had before (git log --follow), then shows the commits that changed any of them, and the bar above the graph lists the earlier names. A file that began as a copy of another is not traced back into the original. If an earlier name was later reused for a different file, the commits of that one appear too.
Gitardo: Show History of Selected Lines, also in the context menu of the editor, narrows the graph to the commits that changed the lines selected, or the line of the cursor when nothing is selected (git log -L). Git follows the lines back from the commit checked out, through moves too, so only its history is shown, whichever branches the graph shows otherwise. When the file in the editor is not as committed, with edits not saved or not committed, the lines are first found in the commit checked out: a line edited since stands for the line it was, and the bar above the graph gives both numbers. Lines added since have no history, and Gitardo says so. The bar names the file and the lines, and Show all commits removes it. The lines stay those of that commit after another is checked out or made, and the bar then names it.
Show Folder History, in the context menu of a folder in the Explorer, narrows the graph to the commits that changed anything in the folder, and the bar above the graph names it. Renames are not followed here: the history of a folder starts where it got its name, and the commits that changed its files under another folder are not in it. It is not offered on the root folder of a repository, whose history is all of it.
Blame
The line under the cursor shows who last changed it, when, and the subject of that commit, dimmed at the end of the line. It takes unsaved edits into account. Hover it for a link that shows the commit in the graph. Turn it off with gitardo.blame.enabled or Gitardo: Toggle Inline Blame.
Wherever the cursor is, Gitardo: Open Commit of Current Line in Editor (Alt+B) opens the commit that last changed the line in an editor tab, and Gitardo: Reveal Commit of Current Line in Graph (Shift+Alt+B) shows it in the graph. Both are in the context menu of the editor too.
The button with a person at the top right of an editor shows it for the whole file: beside each line, before its text, the day it was last changed and by whom. The same button, now a closed eye, hides it again, and so do Gitardo: Toggle File Blame and the entry in the context menu of the editor. It is switched on file by file, and a file keeps it until it is closed.
- What is beside the line under the cursor stands out on a colored background, and so does what is beside every other line of the same commit: what else it changed in the file is seen at a glance. In a file longer than its editor the scroll bar has a mark where those lines are. The colors are
gitardo.blameHighlightBackground and gitardo.blameHighlightForeground, to change with workbench.colorCustomizations.
- At the left of what is beside a line there is a bar in the color of its age: red for a line that was just changed, blue for one changed two years ago or more, and the colors in between for the ages in between. Recent days count more than old ones, so that a day is told from a week.
gitardo.fileBlame.age.enabled turns it off, and gitardo.fileBlame.age.recentColor, oldColor and oldAfterDays change the two colors and how old is old.
- The commit is said beside the first of the lines it changed that follow each other; the ones after it have its bar, and its background when it stands out. When that first line is scrolled out of sight, the first line in sight says it instead, so the lines at the top of the editor are never left unnamed.
gitardo.fileBlame.groupLines turns that off, to have it said beside every line.
- What is said is chosen with
gitardo.fileBlame.format, which is ${date} ${author:20} unless you change it. ${date} is the day of the commit, ${ago} how long ago it was, ${author} who made it, ${summary} the first line of its message and ${hash} its hash; a number after a colon is the most letters it may take, and anything else is written as it is. Each thing starts in one column whatever the lines above and below say. ${ago} ${author:16} ${summary:40}, for example, gives 3 days ago Ann Lee Fix the parser.
- Hover what is beside a line for the subject of the commit, and for links that show it in the graph, open it in an editor tab, or blame the file as it was before: the file opens as the commit found it, in a tab that names the commit it is of, with the blame it had then. That tells who had written what the commit replaced, and going on from there walks back through the history of a line, past the commits that only moved or reformatted it. Gitardo: Blame File Before Commit of Current Line does the same for the line under the cursor.
- The funnel beside the button leaves a line to who wrote it when all that was changed since is its whitespace or its place in the file (
git blame -w -M). It is the setting gitardo.blame.ignoreWhitespaceAndMoves, which holds for the blame of the line under the cursor too.
- The pin beside it shows the blame in every file that is opened, rather than in the ones it is asked for; the button of the blame still hides it in a file, which then stays without until it is closed. It is the setting
gitardo.fileBlame.everyFile. Turning it off leaves the blame to the files it was asked for one by one. Like the funnel, the pin is there while the file shows its blame; Gitardo: Toggle File Blame in Every File switches it from anywhere.
- Lines that are in no commit yet say so, and have the color of what was just changed. What you type says so at once, and git is asked again a moment after you stop, with the text as it is in the editor, saved or not.
- A file that is in no commit has no one to name: Gitardo says so and shows nothing.
- The button is there for files on disk, whenever the workspace has a repository.
- With word wrap on, a long line is folded inside the editor with what is beside it. VS Code does not count what an extension draws before a line when it folds it, so Gitardo keeps the room with an inlay hint of spaces at the start of each line, which it does count, and draws over it. With inlay hints switched off (
editor.inlayHints.enabled), written in a font of their own (editor.inlayHints.fontFamily) or cut shorter than the room (editor.inlayHints.maximumLength), what is beside a line is drawn before it instead, and the first part of a folded line goes past the edge of the editor.
Reflog
Gitardo: Browse Reflog lists the last 200 positions of HEAD. Pick one to show it in the graph, create a branch there, reset the current branch to it, check it out or cherry-pick it. This is how to get back commits that no branch reaches any more, for example after a reset or a rebase.
When branches are named after a convention, gitardo.branches.format writes it down, and Gitardo asks for its parts:
"gitardo.branches.format": "PRJ-${input:ticket}-${input:kind}-${base}",
"gitardo.branches.inputs": [
{ "id": "ticket", "type": "promptString", "description": "Ticket number", "pattern": "^\\d+$" },
{ "id": "kind", "type": "pickString", "description": "Type of change", "options": ["feat", "fix", "chore"], "allowCustom": true }
]
${input:<id>} is asked for as gitardo.branches.inputs says, in the order the format has them. A promptString is typed, and when it has a pattern, a regular expression, what is typed has to match it. A pickString is picked from its options, and with allowCustom the last entry, Type another value…, lets you type one. The value used last is proposed first the next time, or default before any was used.
${base} is the branch it starts from, without its remote: origin/feature/login gives feature/login. From the toolbar, the branch checked out; on a tag, the tag. At a commit you choose what it is: the commit, as its short hash, or one of the branches that have it, the ones at the commit first.
${repo} is the name of the repository's folder, and ${date} today, as 2026-10-15.
With a format set, Create branch…, in the toolbar and on a branch, a tag or a commit, first asks whether to use it, which is where the picker starts, or to type a branch name. The name the format makes is shown, and can be changed, before the branch is created. Creating a worktree asks the same (see Worktrees). The format and the inputs can be set for one repository in its .vscode/settings.json, for everyone who works on it. The settings were gitardo.worktrees.branchFormat and gitardo.worktrees.inputs before, and are still read where the new ones are not set.
Branch cleanup
Gitardo: Clean Up Branches lists the local branches that are merged into the current one, or whose upstream branch was deleted from the remote. Merged branches are ticked. Branches that are not merged are left unticked, and ticking one warns first that its commits may become unreachable. Those ticked are deleted in one git branch -D, after their worktrees are removed: git branch -d would refuse a branch merged into the current one but not into its upstream, and leave the cleanup half done. The current branch is never listed, nor the branch of the main worktree when this window is another worktree.
A branch that another worktree has checked out is listed with that worktree, and the two go together: the worktree is removed with git worktree remove before the branch is deleted, since git deletes no branch that a worktree has, and a folder of the worktrees left empty goes too. A worktree with files not committed is left unticked, like a branch that is not merged, and says how many; if you tick it, it is removed with --force, after a warning that those files are deleted. A worktree whose folder is gone is pruned.
Worktrees
A worktree is another folder checked out from the same repository, on a branch of its own: a place to work on something else, or to let an agent work, without touching the folder you are in.
The + on the title of the Worktrees section, in the Branches view or beside the graph, and Gitardo: Create Worktree… ask for the branch to start from and a name. The name is that of a new branch, and of the worktree's folder, slashes and all: feature/login makes the branch feature/login in the folder login inside feature. While you type, the box says where the folder goes. The new branch has no upstream until it is first pushed, even when it starts from a remote branch, so that it is not pushed onto the branch it came from. Create worktree… on a branch puts that branch in a new worktree, in a folder of its name, and on a commit makes a new branch there, or leaves the worktree on a detached HEAD if the name is left empty.
New worktrees go in the folder that gitardo.worktrees.folder names, ${repo}.worktrees next to the repository unless you change it: the worktree fix-login of ~/code/app is ~/code/app.worktrees/fix-login. ${repo} is the name of the repository's folder, a relative path starts from the folder that holds it, and ~ is your home folder. A folder left empty when a worktree is renamed or removed goes too.
What git ignores, in a new worktree
A new worktree has only what is committed: no node_modules, no .env. Gitardo can give it what git ignores in the folder you are in, after git worktree add, as two settings say:
"gitardo.worktrees.linkFolders": ["node_modules/"],
"gitardo.worktrees.copyFiles": ["/.env", ".vscode/settings.local.json"]
gitardo.worktrees.linkFolders: the folders that git ignores and that match these patterns, in .gitignore syntax, are linked into the new worktree, the outermost ones only. What changes through a link changes in the folder you are in. On Windows the links are junctions, which need no rights.
gitardo.worktrees.copyFiles: the files and folders that git ignores and that match these patterns are copied, except what is inside a linked folder and what the worktree has from its commit. A folder all of whose files match is copied as a whole.
Where neither place sets one of them, Gitardo follows the matching experimental setting of VS Code's Git extension, git.worktreeSymlinkFolders or git.worktreeIncludeFiles, which VS Code applies only to the worktrees it creates itself. One of Gitardo's set anywhere, even to an empty list, is the one that applies: the workspace folder's first, then the user's.
Gitardo: Choose What New Worktrees Get…, also in the … of the Worktrees section and of the Branches view, opens a tab that helps fill them. It lists what git ignores in the folder you are in, with its size, in sections by kind, each with what is proposed for it and why: dependencies such as node_modules, .venv or vendor linked, settings and secrets of this machine such as .env or *.local.json and the editor's settings copied, and build output, logs and the rest left out. What Gitardo does not know comes first; a section where nothing is proposed or chosen starts closed, and the tab remembers the ones you open or close. What has the same name in several places, such as the node_modules or the .env.local of each package, is one line, whose buttons choose for all of them by the pattern of the name, node_modules/ or .env.local, which takes the ones to come as well. Unfolded, it lists each place, and choosing for one of them on its own puts a pattern of its path in place of the name's for each. Use what is proposed takes all of it; Link, Copy and Nothing on each line change one, at once and without running git. Below, the patterns of the two settings can be edited by hand. Git is asked what the patterns take, each with how many it takes from the folder and the list with what it gets, all of it or part, only when the tab opens and with Look again, which also reads again what git ignores; until then the tab says the patterns have changed since. Save writes them to the settings of the workspace folder, .vscode/settings.json, to share them with everyone who works on it, or to the user's settings, and can write VS Code's own two along with them, so that the worktrees VS Code creates get the same. Edit in settings.json opens the file, and Remove from takes the two settings out of it again. Each setting saved or taken out is a line of the log, such as set gitardo.worktrees.linkFolders ["node_modules/"] in the workspace folder, and with gitardo.commandPreview set to all it is shown first. The tab follows what is changed in the settings elsewhere.
In the Explorer, the context menu of a folder has Link into New Worktrees, and that of a file or a folder Copy into New Worktrees, for those selected. Each adds the pattern of its path, such as /packages/api/node_modules/ or /.env, to the setting, and takes it out of the other one. Git is asked first what the patterns would then take, and Gitardo says why it changes nothing: git tracks it, and each worktree has it from its commit; git does not ignore it; a pattern such as node_modules/ gives it that already; or, to copy, it is in a linked folder. Of a folder git tracks part of, what git ignores in it is copied. Where a pattern of its own path gives it something, the menu has Stop Linking into New Worktrees or Stop Copying into New Worktrees in its place, which takes that pattern out of its own setting and says if another one still gives it something. The setting is saved where it is set now, in the workspace folder or the user's settings; where it is not set, in the workspace folder, starting from VS Code's patterns when they apply. VS Code's own two settings are not changed. As on the tab, what is saved is a line of the log, shown first with the command preview set to all.
The first worktree Gitardo creates while neither setting is set, nor commands to run (see Commands in a new worktree), offers Choose What It Gets…, once. Bring ignored files… on a worktree, and Bring ignored files into the other worktrees… in the … of the Worktrees section, give worktrees that are there already what new ones get, without touching what they have.
Gitardo works the patterns out the way VS Code does and says each one in the log, as symlink <folder> and copy <path>, before making it. Nothing is made where the worktree has something already. One that fails does not stop the others, and Gitardo says so once they are done. With the command preview on, the question says the patterns of what will be linked and copied, and from where.
On Windows, git deletes what is inside a junction when it removes a worktree: the folder it links to, in the folder you are in. On macOS and Linux, git refuses to remove a worktree with a symbolic link it does not ignore, such as one that node_modules/ in .gitignore leaves out, since a pattern that ends with / is for folders only. So before Remove… and Gitardo: Clean Up Branches remove a worktree, Gitardo takes out of it the links to folders outside it, among the files git does not track, each said in the log as unlink <path>. A worktree with such links, made by VS Code or by Gitardo, is to be removed from Gitardo, or after deleting the links, not with git worktree remove in a terminal.
Commands in a new worktree
A new worktree can also have commands run in it once Gitardo has created it and made its links and copies, such as npm ci:
"gitardo.worktrees.setupCommands": ["npm ci", "npm run build"]
They run one after the other in a terminal of this window, with the worktree as its folder, each as a task of VS Code named after the worktree, so that you see what they print and can answer what they ask. Each is run by the shell VS Code runs tasks with, PowerShell, cmd, bash or zsh, and is written for it: one command to a line, with no && between them, which Windows PowerShell does not know. One that fails, or that you stop, stops those after it, and Gitardo says which. Each is said in the log as run <command> before it starts. They run only in a trusted workspace, so that a repository you have just cloned runs nothing from its .vscode/settings.json before you trust it. The workspace folder's setting comes first, then the user's.
When the worktree opens in another window or in the Agents window, as Open in worktree does, the commands run here first, and it opens once they have all succeeded, with what they installed. Creating a worktree offers to open it once they have succeeded too. When one fails, Gitardo offers to open it all the same.
The tab of Gitardo: Choose What New Worktrees Get… has a section for them: add one, change its text where it is, move it up or down, or remove it, and Save writes them with the patterns. It proposes commands from the lock files the repository commits at its top: npm ci for package-lock.json, pnpm install --frozen-lockfile for pnpm-lock.yaml, yarn install --frozen-lockfile for yarn.lock (--immutable from Yarn 2), bun install for bun.lock or bun.lockb, one of them only, the one packageManager of package.json names if it has a lock file; and uv sync --locked for uv.lock or else poetry install for poetry.lock, cargo fetch for Cargo.lock, go mod download for go.mod and bundle install for Gemfile.lock. A requirements.txt gets none: no one command installs it into an environment of the worktree's own, whatever the shell.
With a format for branch names set (see A format for branch names), creating a worktree first asks whether to use it, which is where the picker starts, or to type a branch name; on a branch, whether to use the format for a new branch from it or to put the branch itself in the worktree. The name the format makes is that of the branch and of the worktree's folder, and is shown, and can be changed, before the worktree is created.
Once it is created, Gitardo offers to open it:
- Open in Agents Window opens the Agents window of VS Code on the worktree, so that the agent sessions started there work in it, on its branch. It is offered when this VS Code has the Agents window, which works only with its chat agents turned on. Gitardo opens it with a command of VS Code that is not part of its documented API: if it is missing or fails, the worktree opens in a new window instead, and Gitardo says why.
- Open in New Window opens it as the folder of a VS Code window of its own.
Each worktree in the Worktrees section says how it stands: its branch, with ↑ and ↓ for the commits it has that its upstream has not and the other way round, a pencil with the number of files not committed in it, and its open pull request. Its tooltip says the same in words. The files are counted with git status in each worktree, without taking the lock of its index, when the views are read again: what changes in a worktree that is open elsewhere shows here at the next refresh. A branch that another worktree has shows the same count.
A double click on a worktree opens it where gitardo.worktrees.openIn says: a new window (window, the default) or the Agents window (agents).
The same are in the context menu of a worktree, with Open in terminal, Reveal in File Explorer (Reveal in Finder on macOS), and:
- Rename… gives the folder another name, with
git worktree move: inside the folder where the worktrees go, its name is its path from there, slashes and all; anywhere else, the name of its folder where it is. It offers to rename its branch along with it with git branch -m. Git cannot move the main worktree, the folder the repository was created in, nor, on Windows, a folder that another program has open, such as another VS Code window or a terminal: close them first. The worktree open in this window is renamed from another one.
- Remove… asks whether to delete its branch too. The folder is removed with
git worktree remove; when git refuses because it has changes that are not committed, the message has Remove anyway, which removes it with --force. The folders it leaves empty go, then the branch with git branch -d, which keeps a branch that is not merged and says so. A worktree whose folder is gone is not removed but pruned.
- Bring ignored files… links and copies into it what new worktrees get (see What git ignores, in a new worktree), leaving what it has already.
VS Code's own Git extension opens the worktrees of the repositories it has as repositories of its own, and keeps watching their folders, which on Windows can then be neither moved nor deleted. So before renaming or removing a worktree, or cleaning up branches with theirs, Gitardo has it close the ones it has open, each said in the log as git.close <path>. A folder can still be held for a moment after: a move that fails for it is tried again for a few seconds, and when git worktree remove could not delete the folder, which git no longer counts as a worktree by then, Gitardo deletes what is left of it, said as delete <path>, and goes on with the branch.
The branch of a worktree
Git checks a branch out in one worktree at a time, so a branch that another worktree has is worked on there. Gitardo treats it that way:
- It has the worktree's icon instead of the branch's among the local branches, and before the branch's on its label in the graph, and its tooltip says which worktree has it.
- A double click on it opens its worktree, where
gitardo.worktrees.openIn says, instead of trying to check it out.
- Its context menu starts with what opens the worktree: Open worktree in Agents Window, Open worktree in new window, Open terminal in worktree and Reveal worktree in File Explorer. Check out and Delete, which git refuses, are not there; Rename worktree…, Remove worktree… and Remove worktree and delete branch… are. What does not touch the branch's files, such as merging it into the current branch, comparing it or opening its pull request, is there as for any branch.
- Dragged onto a commit of the graph, it offers no rebase: that would have to happen in its worktree.
The branch of the main worktree, seen from another worktree, is the same, except that the main worktree can be neither renamed nor removed.
Another worktree in this window
Show in Gitardo, in the context menu of a worktree, and Show worktree in Gitardo in that of its branch, point the views of this window at it: the graph, the changes, the commits and the branches are its own, and what you do there, staging, committing, pulling or pushing, is done in it, without opening another window. When the repository has more than one worktree, the branch checked out at the start of the toolbar of the graph is a button too: it lists every worktree by its branch, with its folder when it is named otherwise, and the one picked is shown the same way. A worktree selected in VS Code's Repositories view is shown too (see Multiple repositories). A banner at the top of the Graph, Changes and Branches views says which worktree they show, with Back to the repository of the window, which stays chosen in the list of repositories meanwhile. The folder of the window, which the views list as another worktree meanwhile, can be neither renamed nor removed from there. The choice is not remembered: the next time the window opens, the views show its own folder.
Working in worktrees only
Open in worktree, in the context menu of a branch that no worktree has, opens it in a worktree of its own, with nothing asked: the worktree is made in the folder of the worktrees, named after the branch, if it is not there yet, and opens where gitardo.worktrees.openIn says. On a remote branch, the worktree has the local branch of the same name, made to track the remote one if there is none.
With gitardo.branches.openIn set to worktree, that is what a double click on a branch does, and Open in worktree comes first in its menu: every branch is worked on in its own worktree, and the folder open in this window stays on its branch. checkout, the default, checks the branch out here.
Gitardo: Switch Worktree…, also in the … menu of the Branches view, lists the worktrees with their branches and how they stand, as the Worktrees section shows them, the one of this window last, and opens the one you pick where gitardo.worktrees.openIn says. Its last entry creates a worktree.
Submodules
A repository with submodules has a Submodules section among the references, beside the graph and in the Branches view, with the submodules inside them indented under theirs. Each says, by an icon, where it stands against the commit the repository records for it in its last commit:
- a green check: it has that commit checked out;
- a yellow arrow up, with a number: it has that many commits after it, made in it or pulled into it;
- a yellow arrow down: it is that many commits behind it, as after a pull of the repository that moved it;
- both numbers when each has commits the other has not, and a warning when it does not have the recorded commit at all, which a fetch in it or an update brings;
- a grey sign when it is not initialized, its folder empty, and when it is added but not committed yet.
Beside it are the branch it has checked out, or detached, and the number of its files not committed. Hover it for its URL and the two commits.
Its context menu opens it in a new window (also by double-click), in a terminal, in the file manager or in the views of this window with Show in Gitardo; Update to the recorded commit checks that commit out in it, and in its own submodules theirs, with git submodule update --init --recursive, after saying what it would leave behind when it has commits on a detached HEAD or files not committed; Stage <commit> as the recorded commit stages the commit it has checked out, to commit it in the repository; Update to the latest of <branch> goes to the last commit of the branch it follows, with --remote; Initialize clones one that is not initialized. One that is on its recorded commit already is neither updated nor staged again, and one not initialized is updated before it is taken to the latest of its branch: Gitardo says so. Deinitialize… empties its folder and keeps it in .gitmodules, after asking, and offers to force it when it has changes; Remove… deletes it from the repository with git submodule deinit and git rm, then deletes its clone in .git/modules, after a warning, and the removal is staged with .gitmodules, ready to commit.
The + on the title of the section, Add submodule… in the … menu of the graph while there are none, and Gitardo: Add Submodule… ask for the URL of a repository, the folder to clone it in, named after it unless you change it, and the branch it follows, if any: git submodule add clones it, and its own submodules too. Git does not clone a submodule from a folder on disk unless allowed, since a repository could point one at any folder of the computer: when it refuses, Gitardo offers to allow it, with -c protocol.file.allow=always, for the commands that had not run only. Synchronize URLs from .gitmodules copies the URLs of .gitmodules to the submodules after they changed there.
Git leaves the submodules where they are on a checkout, so they no longer match the commit checked out. Gitardo updates them to the commits it records once the checkout is done, with git submodule update --init --recursive, which also clones the ones that commit adds and the ones inside them: after Check out, after creating a branch and checking it out, after Create branch from stash… and after undoing a checkout, when the repository has submodules before or after it. When Gitardo asks before the checkout, it shows that command too, and it asks anyway when a submodule has commits on a detached HEAD that no branch would have then; files not committed in a submodule are kept, or stop the update when they are in the way. The setting gitardo.submodules.updateOnCheckout, on by default, turns this off.
Gitardo follows what happens in the submodules: a commit or a checkout made in one, in its window or a terminal, updates its icon.
Notes
A note is a text git keeps beside a commit without changing it. The note of a commit is shown under its message, in the details beside the graph and in the tab of the commit, in a block Note with its lines as they were written.
- Add note… in the context menu of a commit writes its note; a commit with a note has Edit note…, which proposes the note it has, and Remove note. The pencil and the bin on the block Note do the same, and Undo takes each back.
- The menu of the title Remotes, among the references and in the Branches view, has Fetch notes from
<remote> and, while the repository has notes, Push notes to <remote>: git fetch and git push leave the notes out. When each side has notes the other has not, Merge the notes puts the two notes of a commit one after the other.
Archives
Save as archive… in the context menu of a commit, a branch, a remote branch or a tag saves its files, every file or one folder, as a zip or a tar.gz, under a folder of its name, where you choose. The changes not committed are not in it.
Remotes
Gitardo: Manage Remotes lists the remotes with their URLs. Pick one to fetch it alone (git fetch --prune <name>), change its URL, rename it, copy its URL or remove it; or add a new one. Removing a remote always asks first: its remote-tracking branches go with it, and local branches that followed them lose their upstream, though nothing changes on the remote itself.
Fetch, pull and push in a repository without any remote offer to add one instead of failing.
GitHub and other hosting services
When the main remote is on github.com, Gitardo shows the open pull request of each branch next to it in the references tree, colored by the result of its checks. The context menu of a branch opens its pull request, or GitHub's page to create one. After the first push of a branch Gitardo offers to create its pull request.
Pull requests are read with the GitHub account you signed in to in VS Code. Gitardo asks for it the first time you choose Load pull requests from GitHub (Gitardo: Sign In to GitHub), and never before. The token is only sent to api.github.com. Pull requests opened from forks are not shown.
On GitLab the same are merge requests, numbered !12: Load merge requests from GitLab, in the … menu (Gitardo: Sign In to GitLab), asks once for a personal access token with the scope read_api, kept in the secret storage of VS Code for that GitLab alone, and the labels then show the open merge requests in the color of their pipelines. On Bitbucket, Azure DevOps, Gitea and Forgejo, nothing is read: the context menu of a pushed branch, and the offer after its first push, open the page of the service that creates a pull request. The Compare tab has Open on GitLab, Open on Bitbucket and so on. A GitLab, Gitea or Forgejo of your own is named by the host name of its remotes in gitardo.hosting.selfHosted.
Changes
The Gitardo Changes view, shown with Gitardo: Show Changes:
- One list of the changed files, staged or not, each with a box: ticking it stages the file (
git add), unticking it unstages it. A file with only some of its changes staged, from the diff editor (Stage Selected Ranges) or the Flow Diff, has its box half ticked, and ticking it stages the rest. The box on the header of the list stages or unstages everything at once, and is half ticked when some is staged.
- A staged rename unstages with both of its names, and is then listed as git sees it: the old name deleted, the new one untracked. Ticking both stages it as a rename again.
- Files in conflict are listed apart, above, with no box: Mark as resolved stages one. While some are there, the box of the list names the other files one by one, so that none of the conflicts is taken as resolved or forgotten. Unstage all changes names the staged files too while a merge or a cherry-pick waits to be committed, so that it never ends one.
- A file with edits not saved in an editor has the dot its tab has after its name, and Save on its row; Save all on the header saves all of them. One that git sees no change in yet, because only its editor has changed it, is in the list too, with its box greyed out until it is saved, and Compare with the saved file shows what saving would change. Files of submodules, of worktrees inside the repository and that git ignores are left out.
- Clicking a file opens it, or its diff when
gitardo.changes.openOnClick is set to diff. The buttons on its row open either one: Open File, and Open Changes, its diff as the list of changes of VS Code opens it: the index against the file on disk while some of it is not staged, HEAD against the index once all of it is. A deleted file opens its diff. The setting only changes this view, not the list of changes of VS Code. With gitardo.markdown.openAsPreview on, a Markdown file (.md, .markdown) opens in VS Code's preview of Markdown rather than in its editor.
- Those diffs are served by VS Code's Git extension when it has the repository open, so that its own commands work in them: Stage Selected Ranges, Unstage Selected Ranges and Revert Selected Ranges in the context menu, and the buttons on the changes in the gutter. Without it, Gitardo serves the same versions, and those commands do nothing there.
- The button on the header of the list shows the files under their directories, which open and close, or one after the other. The view remembers the choice. The next button opens all the diffs in one editor.
- Discard changes on a file takes it back to the last commit, staged changes included, and deletes it when it is untracked, after a warning. Discard all changes on the header does the same with all of them.
- Right-click a file for its menu: what the buttons of its row do, then Ignore…, and on a file git tracks Stop tracking, keep on disk… and Hide its changes from git…. A file in conflict has the buttons of its row there too.
- Ignore… asks what to ignore, the file, all the files of its extension, its folder or a pattern you type, and where to write it: the
.gitignore of the repository, the one of the folder of the file, or Only on this computer, the exclude file of the repository, which is not committed. Git is asked first whether the path is ignored already. On a file git tracks, a pattern does not stop git from following it: Gitardo offers to stop tracking it too. Stop tracking, keep on disk… takes the file out of the index (git rm --cached) after a warning, since whoever pulls the commit loses it from their disk.
- Hide its changes from git… keeps the changes of a tracked file out of every commit, such as a settings file changed on your computer only: skipped in the working tree (
git update-index --skip-worktree), or assumed unchanged. Such files are listed at the end of the view under Hidden from git, with their count, so that they are not forgotten: a click opens a file's diff with the last commit, Show its changes to git again brings it back into the changes, and Show all to git again in the … of the group all of them.
- The same entries are in the context menu of a file or a folder of VS Code's Explorer, which shows the repository of the file first: Ignore…, Stop Tracking, Keep on Disk…, and on a file Hide Its Changes from Git… or, once hidden, Show Its Changes to Git Again.
- Commit, or amend the last commit. Committing with nothing staged offers to stage everything first, and refuses while a file is in conflict, which staging would take as resolved with its markers in it.
- The sparkle button drafts the commit message with a language model available in VS Code, such as GitHub Copilot. It sends the model the staged changes, or all changes when nothing is staged, cut to 20,000 characters, and the subjects of the last commits as an example of style. Nothing is sent until you press it, and the draft is yours to edit.
- Stash all changes, untracked files included; a single file, with the stash button on its row; or only what is staged, with the button on the header shown while something is (
git stash push --staged, Git 2.35 or later).
- The list of changes of VS Code, in the Source Control view, gets the same three buttons: on each file, on Staged Changes and on Changes. They are in the context menus there too, where several selected files are stashed together, and they work in the repository of the file, which Gitardo then shows. The setting
gitardo.scm.stashButtons takes them away.
- Commit options, the button beside Commit, has the options of the next commit or amend: Sign this commit, ticked to start when Git's
commit.gpgSign signs every commit, with what it signs with in its tooltip; Add Signed-off-by (--signoff), ticked to start with the setting gitardo.commit.signOff; Co-authors…, a pick of the authors of the history, where Name <email> typed adds someone else, each named in a Co-authored-by line, and each chosen listed in the menu, where a click takes them away; and Skip the hooks (--no-verify). They hold for one commit, then go back to where they start, and each repository keeps its own while another is shown. While one differs from where it starts, a line under the box says so, such as Not signed · With Ben, +1 · Hooks skipped, with the arguments it adds in its tooltip. When Git signs with SSH or X.509 and no key is set, Sign this commit cannot be ticked, and Switch identity… is under it.
- Below the commit box is the name and email the commit will be made with. Click it to switch identity.
- A list of more than 300 files shows the first 300 and a Show all link, here and in the details of a commit or of a comparison. The counts and the buttons on the header still speak for the whole list.
Flow Diff
Another way to look at the diff of a file, beside the diff editor of VS Code. The Open in Flow Diff button (⇄) in the title of a diff editor opens the same diff in its place, and the same button in the Flow Diff goes back to the diff editor. It works on the diffs Gitardo opens and on those of the Source Control view of VS Code: a file against HEAD, the index or a commit, the index against HEAD, a commit against its parent. Nothing opens in it unless you ask.
- The two versions side by side in two editors with the colors of your theme and your
editor.* settings, kept level by blank filler lines, and a band in the gutter between them joining each change to where it lands: green where lines were added, red where they were removed, blue where they changed. Within a changed line, the words that changed are marked.
- The two sides scroll together: line for line through what did not change, and through a long change the shorter side stays in the middle of the screen.
- The gutter is also the line between the two sides: drag it to make one wider, and double-click it to make them even again. The Flow Diff keeps the widths it was left with.
F7 and Shift+F7, or the arrows of the toolbar, go from one change to the next, with how many there are. Past the last one, F7 again goes on to the next changed file. Long runs of unchanged lines fold into a bar that unfolds them, keeping 3 lines around each change: the toolbar switches that for each diff, the setting gitardo.flowDiff.collapseUnchanged for the new ones.
- The buttons in the gutter, on each change: revert it in the file, stage it, or unstage it once it is staged. A change already in the index is drawn dimmed. Staging and unstaging run as Gitardo's operations, in its log and, with the preview on, shown first.
- Some lines of a change, rather than all of it: select them on either side, as text in an editor is selected, or put the cursor on one, and the context menu has Stage lines, Unstage lines and Revert lines, greyed out while no changed line is selected. A line changed into another is taken whole, its old text with its new one. Revert lines gives the lines selected the text of the left side and saves the file;
Ctrl+Z takes it back.
- The file can be edited where it is shown: what is typed goes into the file, unsaved until
Ctrl+S. F4 opens the file at the line of the cursor.
- The title has Open File, the previous and next change, and Stage File, Unstage File and Discard Changes where they apply.
Images
An image at a commit, in the index or in a conflict, opened from Gitardo (Open the file at this revision, the history of a file, a diff from the Gitardo Changes view, the graph, the tab of a commit or a comparison), opens in VS Code's preview of images, and the diff of an image in VS Code's diff editor with its two pictures, its bytes read by Gitardo's engine. A text file opens as before.
Large files stored with Git LFS
A file the repository stores with Git LFS opens by its content when Gitardo opens it at a commit, in the index or on a side of a diff, once the store of the repository has it. One whose content is not downloaded, as in a clone made without downloading, opens as a text that says Stored with Git LFS, not downloaded, with its size and the first digits of its id, never the lines of its pointer, and a message offers Download, which downloads it with Gitardo's engine and shows its content.
Store with Git LFS…, in the context menu of a file of VS Code's Explorer in a repository that stores files with Git LFS already, has Git LFS store all the files of its extension, this file alone, everything in its folder or a pattern typed, written in the .gitattributes at the top; files of the pattern committed before are offered Store them with Git LFS in the next commit.
The Large files tab of a repository, from Large files… in the menu of its row in Gitardo Repositories or Gitardo: Large Files in the Command Palette, has everything Git LFS keeps for it: whether Git LFS is installed, with Open git-lfs.com when it is not, and whether the repository is set up, with Set up; the patterns, each with the file it is in, Track a pattern… and Stop storing with Git LFS; the files of the commit checked out, with their count and size, each with its size, Downloaded or Not downloaded, and who locked it, with Download, Download all and Refresh. The locks are read from the server when the tab opens, on Refresh and after Lock or Unlock, never on their own; a server without locks is said so, and unlocking someone else's lock asks first, since they are not told. Every operation runs with Gitardo's engine, in the log and the Output like the others.
Mermaid diagrams in the preview of Markdown
VS Code's preview of Markdown draws a block of code fenced as mermaid as its diagram: flowcharts, sequence, class, state and entity relationship diagrams, Gantt charts, pies, Git graphs, mind maps and the other kinds Mermaid draws. Gitardo's engine lays it out and draws it in the colors of VS Code's default theme of the kind of yours, dark, light or high contrast, again when the theme changes. It is shown as an image, so nothing in it runs, is followed or is fetched; the screen reader reads its accTitle, or Mermaid diagram. Until it is drawn, and without the engine, the block shows its code; a diagram with an error, or of a kind not drawn, shows its code with a line saying why. When another extension that draws Mermaid in the preview is installed, its blocks are left to it.
Flow Merge
The same way to look at a file in conflict, in three columns: what the current side has, the result, and what the incoming side has. The Open in Flow Merge button (⇄) in the title of the merge editor opens the file in its place, and the same button in the Flow Merge goes back to the merge editor. Gitardo: Open in Flow Merge opens the file of the editor in front. Nothing opens in it unless you ask: a click on a file in conflict still opens the merge editor.
- Each side shows what it changed of the common ancestor, and a band in the gutter joins each of those changes to where it is in the result: green for the current side, blue for the incoming one, grey for a change both sides made the same way, red for a conflict. Within a changed line, the words that changed are marked.
- The result is the file as git wrote it, with what is typed in its editor: the markers of git are marked, and the two parts of a conflict between them are joined to the side each comes from. A conflict resolved in the file is drawn faintly.
- The three columns scroll together, and each gutter can be dragged to make the column on one side of it wider than the other, as in the Flow Diff; a double click on it makes them all even again.
F7 and Shift+F7, or the arrows over the result, go from one change to the next; beside them is how many conflicts are left. F4 opens the file at the line of the result the cursor stands for.
- As it opens, the merge editor of VS Code writes its own start of the result in the file without saving it, where the conflicts show the base and the markers are gone. Going to the Flow Merge undoes that, so that the result is the file git wrote; if something was chosen or typed in the merge editor since, it asks first.
- The buttons on a band put a side in place of its region in the result: → takes the current side and ← the incoming one, and on a conflict + takes both, the side of the band first. A button shows only where it would change what the result has.
Ctrl+Z in the result takes a choice back.
- The button with two ticks over the result accepts at once what needs no choice: each change of one side, and each conflict git marked where the two sides wrote the same lines, where the result does not have it already.
Ctrl+Z takes all of it back.
- What the rules or the AI propose for a conflict still marked is a ✦ button on the band of its current side, whose tooltip gives the reason, and the sparkle over the result accepts all of it at once.
Ctrl+Z takes it back.
- The clock button shows the base, what the two sides started from, in a column at the left of the current side, joined to it by bands. The Flow Merge remembers whether it is shown.
- Mark as Resolved, at the bottom of the result as in the merge editor, saves the file and stages it, which tells git that its conflicts are resolved, and closes the Flow Merge. With markers of git still in the file, it asks first.
- The result can be edited as the file is: what is chosen or typed goes into the file and is not saved until
Ctrl+S, in the Flow Merge or in any editor of the file. Closing the Flow Merge with changes not saved shows the file in an editor, so that they are not forgotten. The merge editor of VS Code saves the file as it opens it.
Identities
Gitardo: Switch Identity sets the name and email used for commits in the current repository, with git config user.name and git config user.email. Choose among the profiles listed in the gitardo.identities setting, type a new one, or go back to your global identity:
"gitardo.identities": [
{ "name": "Ada Lovelace", "email": "ada@work.example", "signingKey": "ABCD1234" },
{ "name": "Ada", "email": "ada@home.example" }
]
signingKey is optional. Switching to a profile without one removes the key the repository had, so that commits are not signed as someone else.
Multiple repositories
Gitardo shows one repository at a time. It finds the repository of each workspace folder, the repositories directly inside a folder, and their submodules. A folder that holds repositories but is itself inside another, such as a home folder kept in git, is about the ones it holds: they come first, and the one around it last. When there is more than one, a list at the start of the toolbar and at the top of the Changes view switches between them, as does Gitardo: Select Repository, and the header of the Commits view names the one that is shown. The list puts the worktrees and the submodules of a repository under it, indented: a worktree under the repository it was made from, a submodule under the repository around it, and its own submodules under it. The choice is remembered per workspace. Show File History switches to the repository of the file on its own.
The Gitardo Repositories view of the side bar lists them all at once, with what each is on. Each repository is a row, and under it are its other worktrees, each by the name of its folder, then its submodules, each by its path; the worktrees are those git lists for the repository, in the workspace or not, but those whose folder is gone. At the right of a row is what is checked out there: the branch, or detached at 3f2a1c9; ● 3 when three files are changed and not committed; ↓2 ↑1 when there are two commits to pull and one to push. A repository up to date with nothing changed says its branch alone.
- Click a row to show it in Gitardo: the graph, the changes, the commits and the branches are its own from then on. The row of what Gitardo shows has a bar on its left, and choosing a repository anywhere else, in the list of the toolbar or in VS Code's own Repositories view, moves the bar; a row clicked here is selected in VS Code's view too, while that view lists one repository at a time. Nothing is chosen while an operation runs, and the row of the repository it runs in has a spinner.
- The chevron at the left of a repository folds the rows under it. Folded, the row stands for the one of them Gitardo shows: it says
api › feature/login, what that worktree is on, and has the bar. What is folded is remembered for the workspace.
- Right-click a row for Open in terminal, Reveal in File Explorer (Reveal in Finder on macOS), Show in Gitardo and Copy path. A worktree of the repository Gitardo shows has there the whole menu it has in the Worktrees section of the Branches view, with Open in New Window, Rename…, Bring ignored files… and Remove…, and a submodule of it the menu it has in the Submodules section; show another repository to have them for its own.
- The row of the repository Gitardo shows has Clean up…, which says the room the repository takes, runs
git gc and says the room it took before, and Look after it in the background…, ticked while git's scheduled maintenance looks after the repository: chosen, it registers the repository with git maintenance start, which schedules git on the computer, and ticked, it unregisters it. While git keeps no commit-graph file of the repository, the row also has Speed up reading the history, which writes one with git commit-graph write --reachable --changed-paths: git's own cache of the commits, with which the history, a search and the history of a file are read about twice as fast. Once the whole history of a repository of 10,000 commits or more is read without one, a notification offers it, with Write it and Not for this repository.
Tab moves to the view, the arrows up and down from row to row, left and right fold and unfold, and Enter or Space shows the row. A screen reader is told each row with what it is on, and which one is shown.
- Each folder is read once when the view opens, by Gitardo's engine, in the background, and again only when something changed in it or in its git folder: saving a file in a worktree that is not shown updates its count within a couple of seconds. No folder is read more than once in two seconds, none while an operation runs, and while the view is folded or the side bar is closed nothing is read: what changed meanwhile is read when the view is in sight again.
With gitardo.repositories.keepOpen on, as it is by default, each repository you leave keeps what the views showed of it: the commit selected and its details, where the graph was scrolled to, the search, the branches shown, which sections of the references are open, and the message of the Changes view. Choosing it again, in the list, in the Repositories view of Source Control or with Show in Gitardo, shows it at once as you left it. While another one is shown, a repository you left is still watched, and a change in it, such as a commit made in a terminal, reads nothing: it is read once, behind what it kept, when you show it again, and the status bar says what changed. What is kept is kept in memory, until the window is closed or the setting is turned off: with it off, choosing another repository starts it afresh.
The other repositories of the workspace are read ahead, so that each is there the first time you choose it: once the repository shown is read, the others of the list are read one after the other, in the background, the status bar saying which, and each is then kept and watched like one you left. None is read while an operation runs or while the repository shown is being read: one being read then is stopped, and waits for its turn again. Their worktrees and their submodules are read when you first show them. With gitardo.repositories.keepOpen off, nothing is read ahead, and with gitardo.readOnStartup off, nothing before the first view of Gitardo is opened.
A worktree of the repository shown has the same commits and the same branches: chosen for the first time, it keeps the rows of the graph where they are and reads no commit again, only what is checked out there and what is not committed, which the graph then marks. So does the repository chosen back from one of its worktrees. A worktree detached at a commit that no branch or tag is on gets that commit read, above the rows.
The repository shown follows the one Source Control is on in VS Code: a click on a repository or a worktree in the Repositories view of the Source Control side bar, or on its changes, shows it in Gitardo. A worktree VS Code lists of a repository of the workspace is shown as one of that repository. The other way round, a repository or worktree chosen in Gitardo is selected in the Repositories view too, as a click on it would, while the view lists one repository at a time ("scm.repositories.selectionMode": "single"): with several listed at once, VS Code gives extensions no way to move onto one without taking the others out of the view, so Gitardo leaves it as it is. To select there, Gitardo uses the commands of the view itself, which it can match to the repositories only while the view lists those of Git alone.
Conflicts
When a merge, rebase, cherry-pick, revert or a patch applied with git am stops, the Graph and Changes views show a banner with Continue, Skip and Abort. A rebase that stopped to edit or split a commit rather than on a conflict says so in the banner: see Interactive rebase and Split a commit. The banner also shows while files are in conflict without such an operation, as after a stash that did not apply cleanly. Conflicting files are listed in the Changes view, and Mark as resolved stages one. Continue says to resolve and stage the files first while one is still in conflict, and Skip warns first while files are staged, changed or in conflict, since git throws away what was resolved in the step.
Selecting a conflicting file opens it in VS Code's merge editor, with the common ancestor as the base and the two sides labelled by what they are in the operation that stopped: in a rebase, Current is what you are rebasing onto and Incoming is your own commit. Save the result there, then mark the file as resolved. A file that one side deleted and the other changed opens in the diff editor instead, as it was beside what the side that kept it made of it, with the title saying which side did what. A file that both sides added has no base, and opens as a normal file. The merge editor is opened through the command VS Code's own Git extension uses, which is not part of the documented API: if a future version changes it, the file opens in the normal editor with its conflict markers.
Conflicts that need no choice
Experimental. This is still being tested, and it is off until you turn on gitardo.conflicts.autoResolve in the settings, where it carries the Experimental mark. While it is off Gitardo does not look into the files in conflict, and nothing of what follows is offered. Look at what it wrote before you commit.
Git stops wherever the two sides changed lines that touch. Many of those stops need no choice between the sides, and Gitardo can resolve them: the banner says how many (Resolve 2 of 3 automatically), a file in conflict has the same button on its row in the Changes view, Gitardo: Resolve Conflicts Automatically does it from the command palette, and the message that says an operation stopped offers it. The buttons of the banner and of a file open the review of the resolutions, where each one is looked at before it is written. A conflict is resolved when it is one of these:
- Changes to lines next to each other. One side changed a line and the other the line after it, or one added or removed lines beside the ones the other changed. Each change is kept where it was made.
- The same change on both sides, such as a line both added among lines each changed in its own way. It is written once.
- Spaces or line endings only. The two sides have the same lines spaced differently: indented with tabs on one and with spaces on the other, with spaces left at the end of a line, or with other line endings. The current side is written. When one side only touched the spaces at the end of lines the other really changed, the real change is written. A space that parts one word in two is not such a difference:
a=1 and a = 1 stay a conflict.
- A change on one side only, where the other turns out to have the lines as they were.
Everything else is left exactly as git marked it: two different changes to the same line, a line one side removed and the other changed, lines both added at the same place, two conflicts with nothing certain between them, a conflict with markers of its own inside. Every line Gitardo writes is a line of one of the two sides, as it is in the file: it never makes one up. What the lines were before either side changed them is read from the index (git show :1:<file>), so the style of the markers does not matter. Binary files, files one side deleted, files larger than 2 MB and files that are not UTF-8 are not touched.
It is also cautious where a file can be read in more than one way. Lines that repeat, such as closing braces and empty lines, can be paired with the ones of the common ancestor in several ways, and git made its choice without saying which. A conflict is resolved only when pairing them from the top and from the bottom gives the same lines, when no new line would end up written twice, when the changes of the two sides do touch as they must have for git to stop, and when the lines around the conflict are lines both sides really have (git show :2:<file> and :3:<file>). The tests run this against git itself on files made mostly of such lines, and it resolves there nothing that git's own account of the conflict would not.
From the command palette and from the message that says an operation stopped, Gitardo asks before it writes anything, saying for each file how many of its conflicts it would resolve and why, which files it would write and which command it would run. Review opens the review of the resolutions instead, where they can be taken one by one. Then the files are written: the ones left without conflicts are staged with git add, and the ones that still have some keep the markers of those and stay unstaged, to be finished in the merge editor. What was typed in a file since git stopped is kept, though a conflict right beside lines changed by hand is left alone, and nothing is written if a file changed between the question and the answer.
Undo, in the message that follows and in the toolbar, marks every conflict again as git had (git checkout --merge), in the files that were staged too.
The review of the resolutions
A tab, Conflicts · <repository>, with every conflict of the files in conflict, one card each: what is proposed for it first, with the lines around it as they are in the file and each line marked by where it comes from, then what the current side and the incoming one changed, on demand, in the colors of the code, and the base. Gitardo: Review the Resolutions of the Conflicts opens it from the command palette.
- Beside the conflicts is the list of the files in conflict, each with how many of its conflicts are accepted and a mark of where it stands: a tick when all of them are, a yellow dot when some have nothing proposed. A click on a file shows its conflicts alone, and All files shows them all again. Over the list, All, Not accepted, Nothing proposed and From the AI, each with how many conflicts it has, keep to those conflicts both the list and the page; a conflict accepted while one of them is on stays in view, folded, until another is chosen. The files one side deleted are under Deleted on one side, and the binary files and the others without markers under Also in conflict, which open in the merge editor. In a narrow tab the list stands over the conflicts.
- Each side is named by the branch it comes from, with the subject of its commit: Current · main and Incoming · feature/map-view in a merge. In a rebase, Current is the branch you rebase onto and Incoming is your branch; a commit cherry-picked or reverted is named by its short hash.
- Every line shown has its number at its left, as the file will have it once those lines take the place of the conflict: the lines after a proposal follow its last line. Conflicts higher up in the file count as they are now.
- At the top of each card, a sentence says what the proposal does with the two sides: Takes only the current side, main, Keeps both sides: main first, then feature/map-view, Takes lines of both sides, and writes 1 line of its own. Under it a bar, and the counts beside it, say how many of its lines come from each side, from both, from the base, and how many neither side has.
- Each line proposed is marked at its left in the color of where it comes from: green for the current side, blue for the incoming one, both colors for a line both sides have, grey for a line of the base, purple for a line neither has. The pointer on a line says it in words.
- A proposal that looks wrong says so at the top of its card: a name both sides gave a value to and that the proposal keeps twice, such as a key of JSON, a property or a variable (version is set twice), with its lines marked; and a JSON file that would no longer be JSON, though it is with either side. Accept all proposed and Accept the file leave those out, and the top of the review says how many are left to look at and accept one by one.
- Compare with the sides, under what is proposed, shows each side as what it changed of the base, as a diff does: the lines it took out, with a minus, over the ones it wrote in their place, with a plus, and the words that changed marked in both, from where the two sides are at the same place again to where they part, with a few lines of the file before and after, numbered as with that side in place of the conflict. Where the base cannot be told, the side shows its lines as they are. With nothing proposed, the sides are shown at once.
- Under what is proposed, Current only, Incoming only, Both, current first and Both, incoming first put that in place of the conflict instead, accepted at once; Edit opens the lines in the card to write them as they should be, starting from what is proposed (or from both sides when nothing is), and Use these lines, or
Ctrl+Enter, takes them. What you choose is a proposal like the others, Your choice, written only with the rest; Drop your choice brings back what was proposed before it. A choice is kept until the conflict is resolved or edited, also when the tab is closed.
- At the bottom of each card, beside the buttons that decide, the proposal says where it comes from: Rules for the conflicts that need no choice, with the reason, AI for what the language model wrote, with how sure it said it is and how many of its lines neither side has, and Your choice.
- Accept on a card takes that resolution, Accept the file takes those of a file, and Accept all proposed takes all of them, but those with a warning. Clear takes the acceptances back. Nothing is written until Write N resolutions.
- A conflict accepted folds to one line, with the first line of its resolution and Accepted to take it back, and a file whose conflicts are all accepted folds to its name: what is left to look at stays in view. The arrow at the left of a conflict or of a file folds or unfolds it by hand.
- A file one side deleted and the other changed has a card of its own, which says which side did what and shows what the side that kept it changed of the file, as a diff, with the lines between the changes left out. Keep it, with these changes takes that side, Delete it deletes it as the other side did: each runs at once, after Gitardo asks, as Take the current side and Take the incoming side do in the Changes view. The button beside them shows the two versions in the diff editor. These cards are shown with the conflicts that have nothing proposed.
- Show the result opens each file beside what the accepted resolutions make of it, in the diff editor.
- Columns, beside Cards at the top, shows each conflict in three columns as the Flow Merge does: the current side, what is proposed and the incoming side, each with the lines the proposal takes the place of, between the lines of the file around them, faded. A band joins each line proposed to the side it comes from, green for the current side and blue for the incoming one; the lines of a side left out are faded, and a line neither side has is marked. The pointer on a line lights it up with the lines it is joined to in the other columns. The columns take the whole width of the tab, and a line too long for its column wraps. A band can be dragged to make the column on one side of it wider, for every conflict at once, and a double click on it makes them even again. The choice and the widths are kept with the tab. In a narrow tab the columns stand one above the other.
- Resolve by hand opens the conflict in the Flow Merge, and the button beside it in the merge editor of VS Code. The line number opens the file at the conflict.
- Writing is one operation: the files are written, the ones left with no conflict are staged with
git add, and the log has a write <file> line for each, with how many conflicts were resolved and by whom. Nothing is written if a file changed since the review read it. Then a report takes the place of the buttons: how many conflicts were resolved in how many files, how many of them by the AI, how many files were staged and what is left, with Undo, which marks the conflicts again as git had, and Continue once no file is left in conflict.
- The tab follows the files: a conflict resolved elsewhere leaves it, and a file edited by hand is read again.
Resolving conflicts with AI
Experimental. This is off until you turn on gitardo.conflicts.ai in the settings. It needs a language model in VS Code, such as GitHub Copilot.
What the rules leave, a language model can propose. Resolve with AI in the banner, the sparkle on the row of a file in the Changes view, Gitardo: Resolve Conflicts with AI in the command palette and the message that says an operation stopped open the review and ask the model about each conflict that has nothing proposed. In the review, Ask the AI about the rest does the same, and Ask the AI on a card asks about that one, or again.
- Gitardo sends the model one conflict per question, two questions at a time: the lines of each side, the base when git wrote it, 40 lines before and after it, the name of the file, and what each side is with the subject of its commit. The model is told that other conflicts in those lines are resolved apart. Nothing is sent until you ask, and never a conflict the rules resolve.
- The model is the first one VS Code has, unless you choose one: Gitardo: Choose the Model That Resolves Conflicts, or the button with its name in the review, lists The first model, then the models of VS Code, such as those GitHub Copilot offers, and then asks how much the model thinks before it answers: as the model is set up, or low, medium, high, extra high or max. More is slower, and often better on hard conflicts; a model without such a setting ignores it. The choices are kept in
gitardo.conflicts.aiModel and gitardo.conflicts.aiEffort, and each proposal of the AI names the model that wrote it. When the model chosen is no longer there, asking says so rather than asking another.
- Small models often write the lines around the conflict again with their answer. Where those lines are as they were sent, Gitardo keeps only what stands in place of the conflict; when nothing is left, the card says the model did not resolve it.
- While the model thinks, the card shows it waiting, then the lines of its answer as they come; a bar over the page counts the conflicts answered, with Stop. When it cannot answer, as with no model available, the card says why and offers to ask again.
- An answer becomes a proposal like those of the rules, to accept or not. A model can write lines that neither side has, and can be wrong: the card counts the new lines, and the log says how many resolutions came from the AI. Look at each one before you accept it.
- The answers are kept until VS Code is closed, for as long as nobody edits their conflict, and also after Undo.
A whole file from one side
In the Changes view a file in conflict also has Take the current side and Take the incoming side, for when one side is simply right: git checkout --ours or --theirs followed by git add, or git rm when that side deleted the file. Gitardo asks first and says what each side is in the operation that stopped, with a warning when the file has lines neither side has, typed in it since git stopped, which would be lost too. Undo marks the conflicts again, except in a file one side deleted, which git cannot mark again.
Conflicts git resolved before
Git can remember how each conflict was resolved and write the same resolution the next time the same conflict comes, as when a merge is undone and made again, or a branch is rebased again (git rerere). Remember how conflicts are resolved… in the context menu of the row of the repository in the Gitardo Repositories view, or Gitardo: Remember How Conflicts Are Resolved… in the Command Palette, turns it on for the repository, and asks whether git leaves the file it wrote for you to look at, or stages it at once. The entry is ticked while git remembers them: chosen again, or Gitardo: Stop Remembering How Conflicts Are Resolved, turns it off, and what git recorded stays, unused.
When git writes a resolution it recorded, the banner says so after the count of the files in conflict, · git resolved 1 as before, and so does the message that says the operation stopped. The row of such a file in the Changes view says Resolved as before, and has, in place of the two sides:
- Show what git wrote, which opens the file as git marked it beside what git wrote, in the diff editor;
- Mark as resolved, once you have looked at it;
- Forget this resolution…, for a resolution that was wrong: git forgets it and marks the conflicts of the file again, after a warning, and records the next resolution instead.
A file git staged at once stays among the staged changes with the same words until the operation ends. The review of the resolutions lists such files under Resolved as before, each on a card that shows what git wrote in place of the markers, with Accept, which stages it, and Forget it….
Ask Gitardo
Ask @gitardo in VS Code's Chat how to do something with Gitardo, in your own words and in any language: how do I put my changes aside, how do I squash my last three commits? It answers in a few steps, with the names of the controls as they are on screen and where they are, as the answer comes, and under it a button for each feature it names that has a command, such as Stash Changes. Gitardo: Ask How To… opens the Chat with @gitardo typed.
The answer comes from a guide to Gitardo's features, made from their descriptions, not from what the model knows of git: when Gitardo does not do something, it says so. It is asked of the model chosen in the Chat, with the question, the earlier questions of the Chat and that guide; nothing of your repository is sent, no path, branch, message or diff. It needs a language model in VS Code, such as GitHub Copilot's.
Command preview
Gitardo runs the git executable found on your PATH, and every command that changes the repository or a remote is written to the Gitardo output channel (Gitardo: Show Command Log), with what it was given on its standard input under it and, once it succeeded, what git printed, such as the link to open a pull request after a push.
Set gitardo.commandPreview to all to see the exact commands before they run and approve them:
| Value |
Behavior |
off (default) |
Only asks before commands that can lose work, rewrite history or change what others see: force push, hard reset, discarding changes, stopping tracking a file, taking a file from another commit over your changes, applying, popping or dropping a stash and bringing back one dropped, deleting a branch or a tag, deleting a branch or a tag on a remote, removing a remote, removing a worktree, removing a submodule, deinitializing one with changes and updating one whose commits would be left on no branch, aborting an operation, skipping a step that would throw away what was resolved, taking one side of a file in conflict, restoring the conflicts of a file, forgetting a resolution git recorded, undo, interactive rebase, editing an older message, squash, split, fixup, branch cleanup, a merge, cherry-pick or patch that is going to conflict, removing or merging notes, unlocking a file someone else locked, and cleaning up the repository. Resolving conflicts automatically asks its own question, which is the confirmation. |
all |
Shows the commands and asks before running anything that changes the repository or a remote, staging included. What runs nothing, such as opening a comparison on GitHub, loading the pull requests or the picks of the model that resolves conflicts, asks nothing more. |
The commands shown are the commands that run: Gitardo adds no hidden flags to them. Where a command would open an editor for a commit message, which cannot work from an extension, the flag that prevents it is part of the command you see (--no-edit, or -c core.editor=true when continuing an operation).
For the same reason, two things that look odd in a command are there on purpose:
- A file whose name is also a pattern to git (it contains
[, ], *, ? or \, or starts with :) is passed as :(literal)<name>. Without it, staging or discarding pages/[id].tsx would also act on pages/i.tsx and pages/d.tsx.
- A branch that shares its name with a tag or with a remote branch is named in full, as
refs/heads/<name>, where the short name would mean the other one or be refused: merging it, starting a branch from it, pushing it.
A few operations do more than run commands:
- Creating, checking out, renaming, deleting, fast-forwarding and cleaning up branches, tags, Undo, staging, unstaging and discarding, committing and amending, every way to stash and to apply, pop or drop a stash, fetching, pulling, pushing and Sync, the remotes and the identity, merging, rebasing, cherry-picking, reverting, resetting, editing a message, squashing, splitting, the fixup, the rebase editor, bisect, copying, saving and applying patches, and Continue, Skip and Abort of an operation stopped on conflicts, taking a whole file from one side and Mark as resolved are run by Gitardo's engine,
gitardo-engine: the log has the engine's commands, its questions use the words of Gitardo's desktop, a name checked as you type is checked in the engine's words, and the new branch is selected in the graph once it is checked out.
- Creating, renaming, removing and pruning worktrees, Open in worktree, Bring ignored files…, and adding, updating, initializing, staging, deinitializing, removing and synchronizing submodules are run by Gitardo's engine too: what new worktrees get still comes from the settings below, and their commands still run in a terminal of this window.
- Resolving conflicts automatically or with AI, which are experimental and off by default, writes the files itself, and then runs
git add. Resolving them automatically first says how many conflicts each file has, and that question is the confirmation; writing the resolutions accepted in the review asks first only when gitardo.commandPreview is all, with the files before the command. The log has a write <file> line for each, with what each file got and by whom. These writes are the engine's, as are Continue, Skip, Abort, taking a whole file from one side and Mark as resolved; the review and its proposals stay in the extension, and the engine writes the question to the language model, which the extension sends to the model of VS Code.
- Creating a worktree, when
gitardo.worktrees.linkFolders and gitardo.worktrees.copyFiles, or VS Code's git.worktreeSymlinkFolders and git.worktreeIncludeFiles, ask for something, links and copies it after git worktree add, with a symlink <folder> or copy <path> line in the log for each (see What git ignores, in a new worktree). Bring ignored files… does the same in a worktree that is there already, and runs no git command that changes anything.
- Creating a worktree, when
gitardo.worktrees.setupCommands has commands, then runs them in a terminal of this window, with a run <command> line in the log for each, and the question of the command preview says them (see Commands in a new worktree).
- Renaming or removing a worktree first has VS Code's Git extension close it, when it has it open, with a
git.close <path> line. Removing one also takes out of it the links to folders outside it, with an unlink <path> line for each, and on Windows, when Windows held the folder so that git could not delete it, deletes what is left, with a delete <path> line (see Worktrees).
Three operations pass data that does not fit on a command line, and the confirmation shows it next to the command:
- Staging or unstaging a change or the lines selected in the Flow Diff runs
git apply --cached with a patch on standard input, made from the file as it is saved: a file with unsaved edits is refused, and is staged once saved.
- Applying a patch from the clipboard writes it to a temporary file, with a
write <file> line in the log, and runs git am or git apply on that file, which is deleted afterwards. A patch from a file is given to git as it is.
- An interactive rebase runs
git rebase -i with sequence.editor set to copy a prepared todo list from a file. The todo list and the messages are written once you agree, each with a write <file> line in the log, into gitardo-rebase in the repository's git folder, which is deleted once no rebase is under way. A reworded commit is a pick followed by exec git commit --amend -F <file>. A commit to edit is an edit, and Gitardo tells such a stop from one on a conflict by the amend file git writes in .git/rebase-merge, while the step done last is that edit. A split of an older commit is an edit of it, followed by the commits after it as pick, and Gitardo leaves a gitardo-split file beside the amend file of git, with the hash of the commit, which goes with the rest when the rebase ends. A squash rewords the oldest commit with the message put together, and the others follow it as fixup, which keeps that message. A fixup uses the todo list git prepares itself, with sequence.editor=true to accept it unchanged.
Gitardo needs Git 2.40 or later for the conflict previews; without it the previews are skipped and everything else works. Read-only queries (git log, git status and similar) never ask; they are logged at the debug level.
Development
To build Gitardo, run its tests or change it, see AGENTS.md and the documents in docs/.
License
Gitardo is released under the MIT license. Its package includes the Codicons font of Microsoft, under CC BY 4.0, and React, under the MIT license.
| |