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

P4 CLI Documentation | 2025.2

# p4 reconcile

Open files for add, delete, or edit to reconcile a workspace with changes made outside of P4 Server. You might need to use this command after working offline from P4 Server.

p4 rec is a synonym for p4 reconcile.

## Syntax

p4 [g-opts] reconcile [-c changelist] [-a -e -d -M -f -I -l -m -n -t] [-w [-K]] [--parallel=N] [file ...]

Syntax and naming conventions

## Description

If the `p4 reconcile` command finds unopened files in a user’s workspace and detects inconsistencies between the workspace and the depot, it takes the following actions:

Inconsistency | Action
--- | ---
Files present in the depot, present in your `have` list, but missing from your workspace | Open for `delete`.
Files present in your workspace, but missing in the depot | Open for `add`.
Files modified in your workspace that are not open for edit | Open for `edit`.
Files opened for delete and present in your workspace without pending resolve records | Reopen for `edit`.
Files that are opened for edit but missing from the client | Reopen for `delete`.
The list of files to be opened includes both adds and deletes | If the file sizes and contents are similar, the missing and added files are compared and converted to pairs of `move/delete` and `move/add` operations.

The following table gives a use case for certain options:

To ... | Use ...
--- | ---
Limit the scope of `p4 reconcile` to add, edit, or delete | -a, `-e`, or `-d` options
Update the `have` list if files are mapped in a client’s workspace to files in the depot that are not on the `have` list | -k option
Preview the set of proposed workspace reconciliation actions | -n option
Improve performance when reconciling changes to large files | -m option
Override the default behavior and ignore the `P4IGNORE` file | -I option
consider whether the file type has changed (see Base file types and modifiers | -t option

### Reconcile and implicit p4 move affects p4 status

If you do a p4 reconcile and some of the files show up as potential "adds" while others show up as "deletes", P4 Server compares the new files and the missing files to see if any of them appear to be the same file. If so, P4 Server links them as if you had used p4 move to open them. The output of p4 reconcile and p4 status will include a "... moved from" line so that you can preview how P4 Server matched the files before you submit them. You can also use p4 resolved after opening the files.

## Options

Option | Description
--- | ---
-a | Add files: Find files in the workspace that are not under P4 Server control and open them for add.
`-c changelist` | Open the files to be reconciled in the specified pending changelist. If you omit this argument, the files are opened in the default changelist.
-d | Delete files: Find files missing from the workspace but present in the depot. Open these files for delete, but only if these files are in the user’s `have` list. (See p4 have.)
-e | Edit files: Find files in the workspace that were been modified outside of P4 Server, and open them for edit.
-M | Add or delete files: Allow the added or deleted files to be compared and converted to pairs of move/delete and move/add operations if they are similar enough.
--parallel=N | Used with the -M option: the N number of files opened for add to be compared simultaneously on the client to the file opened for delete to improve the performance of the move matching.
-f | Add filenames that contain special (wildcard) characters. Files containing the special characters @, #, %, or * are reformatted to encode the characters using hex notation. After these files are added, you must refer to them using their reformatted filenames.
-I | Do not perform any ignore checking, which means to ignore any settings specified by P4IGNORE.
-k | Update the `have` list if files are mapped in a client’s workspace to files in the depot that are not on the `have` list.
-l | Display output in local file syntax with relative paths, similar to the workspace-centric view of p4 status.
-m | Compare the file sync or submit time (in the depot) with the file modification time (in the workspace) to help determine whether the file has changed. Normally P4 Server uses file digests to determine whether files in the workspace differ from the head revisions of these files in the depot. This can be time consuming for large files. But when the timestamps are the same, the costly digest comparisons can be skipped. This option is only relevant if you are using reconcile to find changed files rather than files that were deleted or added.
-n | Preview the results of the operation without performing any action.
-t | Allows the user to reconcile files that are in the user's directory that had their file type changed. The reconcile command opens these files for edit even if the content is unchanged. See Base file types and modifiers.
-w | Forces the workspace files to be updated to match their corresponding latest synced versions from the depot. Workspace files that are not in the depot are deleted. Files that are modified or deleted in the workspace will be replaced with their corresponding versions in the depot. This operation will result in the loss of any changes made to unopened files. The use of p4 reconcile with this option is the same as using the p4 clean command. For other options when using p4 reconcile with the `-w` option, see p4 clean. This option requires read permission.
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
No | No | `open`

- The `p4 reconcile` command produces output in depot syntax. To see file names and paths in local syntax, use the `-l` option with `p4 reconcile` or use `p4 status`.
- When called without arguments, `p4 reconcile` opens the files in a changelist. To preview an operation, use the `-n` option with `p4 reconcile` or use `p4 status`.

- See also Default ignored paths in the p4 ignores topic and the `.p4ignore` token under Notes and examples in P4IGNORE.

## Example

    p4 reconcile -f C:\path\to\symlinkDirectory\...
`p4 reconcile -f *.c` | Use the -f option for wildcards and special characters. To refer to this file in views, or with other commands, you must subsequently use the hex expansion `%2A` in place of the asterisk. To learn more, see Limitations on characters in filenames and entities.

## Related commands

A shortcut for `p4 reconcile -n` | `p4 status`
A shortcut for `p4 reconcile -ead` | `p4 status -A`

Your search for returned results