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

P4 Visual Client (P4V) Documentation | 2025.3

# Create branches

When you branch (noun) A set of related files that exist at a specific location in the P4 depot as a result of being copied to that location, as opposed to being added to that location. A group of related files is often referred to as a codeline. To associate code reviews in P4 Code Review (formerly Helix Swarm) with the projects they are part of, add the 'branch' paths in the P4 Code Reviewproject. (verb) To create a codeline by copying another codeline with the 'p4 integrate', 'p4 copy', or 'p4 populate' command. a codeline A set of files that evolve collectively. One codeline can be branched from another, such as a release codeline from a development codeline. or stream An enhanced type of branch with a dedicated view for clients of the stream (see 'stream view') and built-in rules that determine how changes flow across the stream depot (see 'stream hierarchy'). A stream specification defines a stream. In P4V, stream specs are visible in the Streams Graph and the Streams tab., you create a copy of the source files and folders that is linked to the source by integration history. Typically you create a branch (noun) A set of related files that exist at a specific location in the P4 depot as a result of being copied to that location, as opposed to being added to that location. A group of related files is often referred to as a codeline. To associate code reviews in P4 Code Review (formerly Helix Swarm) with the projects they are part of, add the 'branch' paths in the P4 Code Reviewproject. (verb) To create a codeline by copying another codeline with the 'p4 integrate', 'p4 copy', or 'p4 populate' command. to enable concurrent work, perhaps to stabilize a release without impeding development, or to permit experimentation without jeopardizing the stability of a mainline.

Best practice is to keep the less stable branch up to date with its more stable neighbor by merging from it, then updating the neighbor with completed, stable work by copying. This approach ensures that no work is overwritten, and these policies are encoded into P4 Server streams. If you are hesitating whether to use streams, read the About streams section.

In P4 Server terminology, the term branch refers to a codeline, but it is sometimes used as shorthand for a branch specification or branch mapping, which is a stored source/target mapping that is used to record and simplify a branch operation.

To branch a codeline or stream:

1. Select the source folders and files, right-click and choose Branch​ Files.

   The Branch dialog box is displayed.

2. In the Choose target files/folders field, specify the branch that you want to create. (Note: if the target already exists, you are not branching: you’re merging — or integrating in the terminology of the P4 Command-line Client).
3. Optional: Add comments to the `View` field by starting the comment with `##`
4. Configure any desired options (for details about options, see Merge files between codelines) and click Branch. Files are opened for branch in a pending changelist.
5. If you’ve chosen the auto-submit option, the pending changelist is submitted immediately. If you’ve chosen Add files to pending changelist, submit the changelist when you are ready to create the branch.

Click Set Defaults to open the Branch preferences page, where you can set default behaviors for the Branch dialog box.

Your search for returned results