Skip to content
GitPersonaGitPersona

Smart Switching

Smart Switching watches your active repository in the background and applies the profile it resolves to — automatically — so the right identity is active by the time you commit.

What it does

When enabled, a workspace watcher monitors the repository you're working in. On a repository change it resolves the intended profile — from the repository's assignment or a matching rule — and applies it. The watcher reports how many repositories it is monitoring and the last automatic switch.

Note: Smart Switching only ever applies profiles you have already set up. It decides which profile a repository should use; it does not invent identities or change anything outside the normal switching pipeline.

Smart Switching vs Commit Guard

Smart Switching is proactive: it applies the right profile ahead of time so the correct identity is active before you commit. Commit Guard is the verification at the other end: a pre-commit hook that checks the identity the moment you commit and warns or blocks on a mismatch. They are complementary — run both for defense in depth.

Switch outcomes

Each evaluation results in one of:

  • Switched — a different profile was applied automatically.
  • Already active — the repository's profile was already the active one; nothing to do.
  • No assignment — the repository is tracked but has no profile to switch to.
  • Pending confirmation — a switch is warranted but is waiting for you to confirm it.

Configuration

Smart Switching is configured from Settings:

  • Enabled — the master switch. When off, the watcher does not run. It is off by default.
  • Confirm before switch — require explicit confirmation before an automatic switch is applied. When on, a warranted switch becomes Pending confirmation until you accept it.
  • Show notification — surface an in-app notification after an automatic switch.
  • Start on launch — begin watching automatically when GitPersona starts.
Tip: Pair Start on launch with the tray options in Settings & tray so GitPersona keeps watching in the background even when the window is closed.

Watcher control

You can pause and resume the watcher, or restart it. Confirmation prompts for a pending switch can be accepted or cancelled per repository.