> ## Documentation Index
> Fetch the complete documentation index at: https://vibex.peatboy.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Git workflow

> Inspect, isolate, commit, and deliver code changes in Vibex.

Vibex offers a Git-native review interface. It does not decide when you should commit, and it does not roll the workspace back when you stop an Agent.

Open the Git panel from the **Git** icon in the right sidebar. At the top of the panel are two sub-tabs, **Changes** and **Commits**.

## Review changes

The **Changes** tab shows workspace status and diffs:

* Files are grouped by status and marked with a single-letter code: `M` modified, `A` added, `D` deleted, `R` renamed, `C` copied, `U` untracked, `!` conflicted.
* Selecting a file shows a **unified diff** on the right and states whether it is `staged` or `unstaged`.
* An empty state shows **No Git status**, and no differences shows **No diff**.

The **Commits** tab shows commit history and supports:

* **Search commits** to search by commit message.
* **Branch** and author filters (the author picker defaults to **All Users**).
* Filtering by author date range.
* Clicking a commit to open the **Commit detail** drawer with the full diff. The drawer truncates its label to 48 characters with the whole subject in a tooltip, clamps the commit body to three lines with a click and keyboard expand toggle, and replaces the header badge with a summary row (changed-file count, total additions and deletions, plus **Side-by-side diff**, **Wrap long lines**, and **Collapse all files** toggles). File rows stand at 36px and every diff row starts with a colour rail.

<Note>
  Only the **Commit detail** drawer offers a side-by-side view; the working-tree diff view is still unified only. There is also **no hunk-level staging** — staging works on whole files. There is no stash or tag interface; use the terminal when you need those.
</Note>

## Branches and commits

The Git panel toolbar offers **Fetch**, **Push**, **Refresh Git**, branch creation and switching, and a menu of further actions.

A typical flow:

1. Create or switch a branch.
2. Read the file diffs.
3. Run **Stage** or **Unstage** on a file (whole file).
4. Type a message into the **Commit message** field and commit.
5. Use **Amend commit** when you need to append to the previous commit.
6. **Fetch** updates remote references, and **Push** publishes local commits.

<Warning>
  **Revert**, **Checkout branch**, **Amend commit**, **Push**, **Merge worktree**, and **Discard worktree** all show a confirmation dialog, because they can change existing history or remote state. Confirm the branch, remote, and pending diff first, and create a backup branch when your team's policy requires it.
</Warning>

## Worktree

A worktree is a separate workspace under the same project — see [Projects and workspaces](/docs/en/workspaces). The Git panel covers the whole lifecycle:

| Action                                    | Description                                                                     |
| ----------------------------------------- | ------------------------------------------------------------------------------- |
| **Create worktree**                       | Create the isolated directory and its associated branch.                        |
| **Review changes** / **Mark ready**       | Move it toward a mergeable state.                                               |
| **Merge** / **Rebase**                    | Merge back into the target branch (mapped to `NoFfMerge` and `RebaseAndMerge`). |
| **Mark resolved**                         | Mark a file as handled after resolving its conflicts one by one.                |
| **Abort merge**                           | Give up the merge in progress.                                                  |
| **Rename Worktree** / **Delete Worktree** | Rename or delete. Deleting also removes uncommitted content.                    |

Conflicts are handled file by file, and for each file you can keep either the target side or the source side.

<Info>
  A **Local** workspace modifies the main checkout directory directly; a **Worktree** gives parallel tasks their own directory. Either way, the authoritative runtime's Git state is what counts.
</Info>

## Common flow

```text theme={null}
review status -> read diff -> run tests -> stage -> commit -> fetch -> rebase/merge -> push
```

Do not switch branches while tests or an Agent are still running. Before committing, check whether sensitive files, build outputs, or credentials were added by accident.

## Mobile

Mobile can read Git status and diffs, and can stage / unstage / revert / commit / fetch / push and create worktrees — provided the device permission level is `full_control`.
