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

# fs.change

> Manage active changes inside a mounted Mesa filesystem.

Mounted filesystems expose change controls under `fs.change`.

## fs.change.new()

Create and switch to a new change from a bookmark or existing change.

```ts theme={null}
const result = await fs.change.new({ repo: 'app', bookmark: 'main', message: 'Try new copy' });
console.log(result.changeOid);
```

<ParamField path="repo" type="string" required>
  Repository name.
</ParamField>

<ParamField path="bookmark" type="string | undefined">
  Bookmark to fork from. Mutually exclusive with `changeId`.
</ParamField>

<ParamField path="changeId" type="string | undefined">
  Change ID to fork from. Mutually exclusive with `bookmark`.
</ParamField>

<ParamField path="message" type="string | undefined">
  Description for the new change. Omit to create the change with no description; pass `""` explicitly for an empty description.
</ParamField>

## fs.change.edit()

Switch to an existing editable change. This never creates a new change.

```ts theme={null}
await fs.change.edit({ repo: 'app', changeId: 'zyxwvutsrqponmlkzyxwvutsrqponmlk' });
```

<ParamField path="repo" type="string" required>
  Repository name.
</ParamField>

<ParamField path="bookmark" type="string | undefined">
  Bookmark whose existing change should be edited. Mutually exclusive with `changeId`.
</ParamField>

<ParamField path="changeId" type="string | undefined">
  Existing change ID to edit. Mutually exclusive with `bookmark`.
</ParamField>

## fs.change.list()

List changes reachable from the current checkout's commit.

```ts theme={null}
const changes = await fs.change.list({ repo: 'app', limit: 10 });
```

<ParamField path="repo" type="string" required>
  Repository name.
</ParamField>

<ParamField path="limit" type="number | undefined">
  Maximum number of changes to return. Defaults to `50`. Pass `0` for no limit.
</ParamField>

## fs.change.current()

Return the currently active change for a repo.

```ts theme={null}
const current = await fs.change.current({ repo: 'app' });
console.log(current.changeId, current.commitOid);
```

<ParamField path="repo" type="string" required>
  Repository name.
</ParamField>

## Response types

<ResponseField name="ChangeResult.changeOid" type="string">
  Hex-encoded change OID of the now-active change.
</ResponseField>

<ResponseField name="ChangeInfo.changeId" type="string">
  Hex-encoded change ID.
</ResponseField>

<ResponseField name="ChangeInfo.commitOid" type="string">
  Hex-encoded commit OID the change currently points to.
</ResponseField>
