Create branches

When you branchClosed (noun) A set of related files that exist at a specific location in the Helix Core 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 Helix Swarm with the projects they are part of, add the 'branch' paths in the Swarm project. (verb) To create a codeline by copying another codeline with the 'p4 integrate', 'p4 copy', or 'p4 populate' command. a codelineClosed A set of files that evolve collectively. One codeline can be branched from another, such as a release codeline from a development codeline. This allowing each set of files to evolve separately. or streamClosed A branch with built-in rules that determine which changes to propagate to files in a stream depot, and in what order. A stream specification defines a stream. A user creates a stream spec by using the 'p4 stream' command or in P4V with File > New 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 branchClosed (noun) A set of related files that exist at a specific location in the Helix Core 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 Helix Swarm with the projects they are part of, add the 'branch' paths in the Swarm project. (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 Helix Core Server streams. If you are hesitating whether to use streams, read the About streams section.

In Helix Core 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.