<!-- https://testapilocally.com/docs/core-features/git-workbench/ -->
# Git workbench

Built-in Git mode for cloning, branching, staging, committing, and syncing Signoff workspaces. **Windows App only** — the VS Code extension intentionally omits the Git tab and routes you to VS Code Source Control instead.

---

### Status, stage, commit, fetch, pull, push

* **Platform Availability:** Windows Only
* **Overview:** Full workbench over the workspace folder’s Git repo: see status, stage hunks/files, commit, and sync with remotes without leaving SignOff Studio.
* **How It Works (Windows App):**
  1. Switch the top-bar mode to **Git**.
  2. Review status; stage files; enter a commit message; **Commit**.
  3. **Fetch** / **Pull** / **Push** using the configured remotes.

![Windows git workbench](/docs/assets/screenshots/windows/windows-git-workbench.png)

* **How It Works (VS Code Extension):**
  1. There is **no** Git mode tab in the webview.
  2. Use VS Code **Source Control** on the same workspace folder on disk.
  3. Keep editing collections in Signoff; commit with the IDE.

![VS Code activity bar (use SCC)](/docs/assets/screenshots/vscode/vscode-activity-bar.png)

* **Code / Configuration Examples:**

```bash
# Equivalent CLI outside Signoff
git status
git add collections environments
git commit -m "Update Pets collection asserts"
git pull --rebase
git push
```

* **Edge Cases, Troubleshooting & Pro-Tips:**
  - Browser/dev hosts report Git unavailable — use the packaged Windows app.
  - Never commit secret env values; keep secrets stripped from committed files.
  - Large binary artifacts in reports/ should stay gitignored.

> **GAP IDENTIFIED:** Git workbench (status/stage/commit/sync/branches/remotes/clone/init/import) is **Windows Only**. VS Code users should use the built-in Source Control view and terminal Git on the shared workspace folder.

---

### Branches, remotes, clone, init

* **Platform Availability:** Windows Only
* **Overview:** Create/switch branches, manage remotes, clone repositories, and initialize Git on a folder. Designed for teams that keep API collections per JIRA branch.
* **How It Works (Windows App):**
  1. Open **Git** → branch controls to create or switch.
  2. Add/edit remotes (e.g. `origin`) via the remotes UI.
  3. **Clone** a URL into a folder or **Init** Git on an existing Signoff workspace.

![Windows git workbench branches](/docs/assets/screenshots/windows/windows-git-workbench.png)

* **How It Works (VS Code Extension):** Use `git clone` / Source Control / Command Palette Git commands in VS Code.

![VS Code command palette](/docs/assets/screenshots/vscode/vscode-command-palette.png)

* **Code / Configuration Examples:**

```bash
git clone https://git.example.com/qe/pets-collections.git
cd pets-collections
# Open this folder as a Signoff workspace
```

* **Edge Cases, Troubleshooting & Pro-Tips:**
  - Cloud GitHub/GitLab OAuth login is **not** on the Windows Settings → Integrations surface — use HTTPS remotes with credential manager or SSH agents.
  - After clone, use **Switch Repository** / connect workspace flows to bind Signoff to the repo root or nested workspace.

---

### Git import panel

* **Platform Availability:** Windows Only
* **Overview:** Guided import for cloning or opening a repository and connecting a Signoff workspace, including branch switching for ticket-based collection work.
* **How It Works (Windows App):**
  1. From Git mode, open the import / connect flows.
  2. Clone or open an existing repo; pick the Signoff workspace root if nested.
  3. Switch branches when your team isolates collections per ticket.

![Windows workspace menu (related)](/docs/assets/screenshots/windows/windows-workspace-menu.png)

* **How It Works (VS Code Extension):** Import workspaces via **SignOff Studio: Import Workspace** and manage Git separately in the IDE.

![VS Code sidebar welcome](/docs/assets/screenshots/vscode/vscode-sidebar-welcome.png)

* **Code / Configuration Examples:**

```text
Repo root/
  signoff-workspace.json
  collections/
  environments/
  runner/schedules.json
```

* **Edge Cases, Troubleshooting & Pro-Tips:**
  - Multiple Signoff workspaces in one monorepo: pick the correct relative root when connecting.
  - Schedules JSON is Git-friendly; machine-local monitor status is not — don’t expect last-run badges to match across clones.

> **GAP IDENTIFIED:** No parity path for Git import panel inside VS Code. Workaround: clone with VS Code/terminal, then **SignOff Studio: Open Workspace** / **Import Workspace** on the folder.

---

## Related

- [Workspaces](/docs/workspaces/)
- [Interface tour](/docs/interface-tour/)
- [Parity & gap report](/docs/parity-and-gap-report/)
