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

P4 CLI Reference | 2025.1

# p4 add (graph)

Open a new file to add it to the repo.

## Syntax

    p4 [g-opts] add [-c changelist -n -t filetype] file ...

Syntax conventions

## Description

Open a file for adding to the depot.

- To associate the open files with a specific pending changelist, use the `-c` flag. If you omit the `-c` flag, the open files are associated with the default changelist
- To specify file type, use the `-t` flag
- To display a preview of the specified add operation without changing any files or metadata, use the `-n` flag

## Options

`-c changelist` | Opens the files for `add` within the specified changelist. If this option is not used, the files are linked to the default changelist.
`-n` | Preview which files would be opened for add, without actually changing any files or metadata.
`-t filetype` | By default, p4 add assumes the file is a simple text file. The following alternate filetypes are available: text+x - executable file, such as a shell script symlink - symbolic link binary - binary file binary+F - large binary file, to be stored using git-lfs
`g-opts` | See Global options.

Your search for returned results