Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.1

# Sync files from graph depots

You can sync an entire graph depot or one or more repos to a client workspace with appropriate mappings using the p4 sync command. When syncing information from a graph depot, this command can only take on a limited number of options.

By default, if you do not specify a branch, `p4 sync` syncs the `master` or main branch of the repo, unless the `DefaultBranch` field in the repo spec specifies a different branch. To specify a default branch, see Specify a default branch). You can also append the branch name to the command to sync a different branch, as follows:

    $ p4 sync branchName

In addition, you can sync:

- a Git commit associated with a SHA-1 hashkey
- a particular reference or commit of a repo
- repos associated with a specific label
- repos/files containing a P4 Server wildcard

Note that it is not possible to sync individual files with the `p4 sync` command. You can only gain control of individual files if you specify them in the `View` field of the client workspace specification. Otherwise, the whole repo is synced, even if you specify a file in the command line.

For details and examples, see p4 sync (graph) in P4 CLI Reference.

In this section:

Your search for returned results