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

# aether git

> Git operations on workspace repositories

# aether git

Perform git operations on the repository in your workspace. All commands run through the workspace WebSocket connection.

## Usage

```bash theme={null}
aether git <subcommand> [flags]
```

## Subcommands

| Subcommand            | Description                                   |
| --------------------- | --------------------------------------------- |
| `diff`                | Show changes compared to the base branch      |
| `revert <path>`       | Revert a single file to its base branch state |
| `revert-all`          | Revert all changes in the workspace           |
| `snapshots`           | List git snapshots                            |
| `restore <messageId>` | Restore the workspace to a snapshot           |

## aether git diff

Show a unified diff of all changes compared to the base branch.

```bash theme={null}
aether git diff
```

```diff theme={null}
diff --git a/src/auth/login.ts b/src/auth/login.ts
index abc1234..def5678 100644
--- a/src/auth/login.ts
+++ b/src/auth/login.ts
@@ -41,6 +41,9 @@ export async function login(email: string, password: string) {
   const user = await findUser(email);
+  if (!user) {
+    throw new AuthError("User not found");
+  }
   const valid = await verify(password, user.hash);
```

## aether git revert

Revert a single file to its state on the base branch.

```bash theme={null}
aether git revert <path>
```

```bash theme={null}
aether git revert src/auth/login.ts
```

```
Reverted src/auth/login.ts
```

## aether git revert-all

Revert all changes in the workspace back to the base branch state.

```bash theme={null}
aether git revert-all [flags]
```

| Flag      | Description              |
| --------- | ------------------------ |
| `--force` | Skip confirmation prompt |

```bash theme={null}
aether git revert-all
```

```
This will revert all changes in the workspace. Are you sure? [y/N]
```

```bash theme={null}
aether git revert-all --force
```

```
Reverted all changes.
```

## aether git snapshots

List git snapshots. Snapshots are created automatically at key points during agent runs.

```bash theme={null}
aether git snapshots [flags]
```

| Flag      | Description                         |
| --------- | ----------------------------------- |
| `--limit` | Maximum number of snapshots to show |

```bash theme={null}
aether git snapshots --limit 5
```

```
MESSAGE ID      CREATED              DESCRIPTION
msg_a1b2c3d4    2025-01-15 10:30     After fixing login bug
msg_e5f6g7h8    2025-01-15 10:28     Before running tests
msg_i9j0k1l2    2025-01-15 10:25     Initial file edits
```

## aether git restore

Restore the workspace to a specific snapshot.

```bash theme={null}
aether git restore <messageId> [flags]
```

| Flag      | Description              |
| --------- | ------------------------ |
| `--force` | Skip confirmation prompt |

```bash theme={null}
aether git restore msg_a1b2c3d4
```

```
This will restore the workspace to snapshot msg_a1b2c3d4. Unsaved changes will be lost. Are you sure? [y/N]
```

```bash theme={null}
aether git restore msg_a1b2c3d4 --force
```

```
Restored to snapshot msg_a1b2c3d4
```
