Feature · Develop

Git in the file list — status, changes, branches, history

Git status badges in the file list, the branch in the status bar, views for changes (stage, commit, stash), branches and history — plus fetch, pull and push.

Default shortcut: Ctrl+Shift+G · Ctrl+Shift+H Updated 15 August 2026 View as Markdown

Open a folder inside a git repository and cwdio shows you what git knows: which files changed, which are new, which are ignored, what branch you are on and how far ahead or behind it is — in the file list itself, before you open anything.

What it does

  • Status column. Modified, added or untracked, and ignored files carry a badge; a folder shows the highest-precedence state of anything under it; clean files show nothing. The column fills after the listing has painted, so it never slows a directory down.
  • Branch in the status bar. ⎇ main plus a ↓behind ↑ahead badge, read straight from .git/HEAD (no git process) and refreshed live when something else — the embedded terminal, another tool — checks out a different branch.
  • Changes view (Ctrl+Shift+G). Every changed file with a diff, per-file stage / unstage checkboxes, Stage all / Unstage all, Commit with an Amend last commit option that pre-fills the previous message, Stash (named, including untracked files) with a list to apply / pop / drop, and Discard behind a two-step confirm — an untracked file’s discard goes to the Recycle Bin.
  • Branch switcher. The status-bar chip opens a keyboard-first picker: type to filter, Enter to check out; a name that does not exist offers Create branch; rows can be renamed inline (F2) or deleted (safe -d, with a visible Force delete escalation for an unmerged branch).
  • History view (Ctrl+Shift+H). The log, filterable by subject, author or hash; Enter on a commit shows its full patch, coloured, with a strip of the files it touched — click a chip to jump to that file’s section; a button copies the hash.
  • Fetch / pull / push. A Sync row in the changes view (and Go-menu / palette commands): fetch with prune, pull (fast-forward only by default; merge or rebase offered on divergence; abort on conflict), push, and Publish branch when there is no upstream yet.

How to use it

  1. Navigate into any folder of a repository. Badges appear; the status bar shows the branch.
  2. Ctrl+Shift+G to review changes: tick the files to stage, write a message, Commit.
  3. Click the branch chip to switch or create a branch; Ctrl+Shift+H to read the history.
  4. Push from the Sync row. If a credential is refused, the view says so and points you to the embedded terminal, where your git can prompt and cache once.

How it stays cheap and safe

  • Repository detection is a filesystem walk for .git, not a git rev-parse spawn; the vast non-repo parts of your disks never start a process. The one git status per repo folder is timeout-bounded and de-duplicated in flight.
  • Network operations run non-interactively — stdin closed, GIT_TERMINAL_PROMPT=0, a generous killable timeout — so a hidden credential prompt can never hang the app. cwdio adds ssh -o BatchMode=yes only if you have configured neither GIT_SSH_COMMAND, core.sshCommand nor GIT_SSH; your own ssh setup always outranks it.
  • Every command that can lose work — discard, drop stash, delete branch, force-push — is a two-step confirm; every one that cannot (stage, unstage, commit, stash, switch) just runs.

What it deliberately does not do

  • It does not store your git credentials or tokens, and it does not manage remotes beyond origin.
  • It is not a merge-conflict resolver: a conflict offers Abort and leaves the working tree for you and your editor.
  • Worktrees and submodules whose .git is a file are not (yet) recognised for the branch chip and history.

Questions

Does browsing my drive run git everywhere?

No. cwdio finds a repository by looking for a .git folder up the parents — a sub-millisecond file check, no git process — and only inside a working tree does it run one git status for the folder you are looking at. Outside repositories nothing is spawned. If git is not installed, badges simply do not appear.

Which git does it use, and where do my credentials come from?

Your own: the git on your PATH, your ssh client and your existing configuration. cwdio holds no git credential store — authentication is delegated to Git Credential Manager, ssh-agent or Pageant exactly as VS Code does. It sets its own non-prompting ssh options only when you have configured none, so a PuTTY user keeps plink. If a credential is refused, the fallback is cwdio's embedded terminal, where git can prompt.

Can pull or push do something destructive by accident?

Pull is fast-forward-only by default and refuses cleanly on divergence; only then does the changes view offer an explicit Merge or Rebase, and a conflict offers Abort. Push is plain; a rejected push offers force-push behind a two-step confirmation and always uses --force-with-lease, never bare --force. Discarding changes and deleting or force-deleting a branch are likewise two-step confirms; discarding an untracked file moves it to the Recycle Bin.

Do I get a diff?

Yes. The changes view shows each file's working-tree-versus-HEAD diff, the history view shows a commit's full patch with a changed-files strip you can jump by, and Compare files (Ctrl+Shift+D) diffs any two files side by side. Bytes stay in cwdio's host process; only the small row list crosses to the interface.