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

# Sync changes in a Workspace

You can sync recent changes to your files or all changes. Domino recommends that you sync your work at least daily.

<Warning>
  If you’re using a Git-based project, the navigation pane in your workspace is different than if you were using a Domino project. See [Use Git in your workspace](/cloud/platform-capabilities/core-concepts/workspaces/use-git-in-your-workspace) to learn more about saving and syncing your work using Git in a Git-based project.
</Warning>

## Sync changes to files

When you sync changes to remote Git repositories, Domino fetches the latest content from the remote branch (`git fetch`), then commits local changes on top of the updated branch (`git rebase`), and then pushes the commits to the remote.

1. Click **File Changes** in the navigation pane of your workspace.

2. Under **Files**, expand **File Changes** to view changes.

3. Enter a commit message.

4. Click **Sync to Domino**. Changes to files in the `/mnt` directory of your workspace will be synced to the Domino File System (DFS). Changes to files outside of the `/mnt` directory will not be synced.

   <Warning>
     Files with names containing "?" can be saved in a workspace and synced to the DFS, but will not be viewable via the Code page.
   </Warning>

5. After syncing to Domino is complete, you can view your files in the **Code** section of your project.

## Sync all changes

1. Click **File Changes** in the navigation bar of your workspace.

2. Under **All Changes**, enter a commit message.

3. Click **Sync All Changes**. Domino will save all your work to the Domino File System (DFS).

Sync in detached HEAD state

If you launch a workspace from a commit ID in a Git-based project and then try to sync or pull changes, you may see an error that it failed to commit and push repos because it’s in a detached HEAD state.

In this scenario, your workspace is in a [detached HEAD state](https://git-scm.com/docs/git-checkout#_detached_head). In order to pull or sync, you must [checkout a branch](https://git-scm.com/docs/git-checkout).

Different IDEs may provide different ways to checkout a branch. The following instructions will work for Jupyter Notebook.

1. Click **New > Terminal**.

2. Type `git checkout -b my-new-branch-name` into the terminal. Your new branch starts from the commit ID that you launched with.

3. Re-try the sync or pull action.

<Warning>
  When saving your work, remember that changes to files outside the `/mnt` directory will not persist if you stop your workspace and resume the workspace at a later time.
</Warning>

## Force changes

When files are in conflict, you can choose to either resolve manually or force changes. **Force my changes** overwrites remote files with changes in your workspace. This means that the commit history on the remote will match the commit history in your workspace.
