Understanding the Branch Workflow

Branches on the ActiveState Platform allow users to have more flexibility to work with complex projects. Branches bring support for experimental builds, managing complex multi-platform projects, different builds per environment, and more.

You must be on a paid tier to take full advantage of the branch feature. For more information on pricing: https://www.activestate.com/solutions/pricing/

alt text

Create a branch

Branches afford new types of working:

  • You may want to have a number of different ideas in progress at any time – some of which will require packages that are not part of your original project.
  • You might have a complex project with a base set of common packages, but with slight platform differences.

Changes made on a branch are localized, so you can safely experiment on other branches without impacting your main branch.

Using the Dashboard

  1. Login to the ActiveState Platform using your credentials or with your GitHub account.

  2. Open any of your existing projects.

  3. Click on or the Configuration tab. a. You will notice shows you are on the main branch.

  4. Click on Manage or go to Project Settings. 2. You can now add a new branch of the main branch.

  5. Click on Add Child and name your branch.

  6. If successful, you will see your child branch in the UI:

Using the State Tool

  1. Navigate to your project path in your Terminal. a. If you are using a private project, remember to authenticate using state auth.

  2. Activate your project using state activate.

  3. Review the current branch you are in using state branch, which should default to main.

  4. To create a child off your main branch, use state branch add <child-branch-name>.

  5. To switch to your branch, use state branch add <child-branch-name>.

alt text

Updating a branch

The ActiveState Platform will notify you when a child branch has updates available from its parent’s branch.

If the main branch has been updated (by you or another authorized owner), your branch will get a notification that you can update it to keep in line with the main branch.

This is especially useful when:

  • Vulnerabilities were found in a package and expose a security risk
  • A proven package needs to be added that all users would benefit from

Using the Dashboard

  1. Go to the main branch of your project.
  2. Make any change that would trigger a commit. a. For example: Add a new package to the project.
  3. Commit the changes.
  4. Select the child branch. a. On to the child branch you will see a notification to update:
  5. Click on the Update button will show you the changes between your branch and the main branch and you can choose to click on “Update” a. This will trigger an automated commit with the description “Merged upstream changes”.

Using the State Tool

  1. The State Tool currently does not allow merging upstream changes into a child branch.

Switching Branches in the State Tool

  1. In your shell, type state branch switch <branchName> to change branches.

alt text

Download builds from branches

Using the Dashboard

  1. Under the “Download Builds” tab, go to the branch dropdown.
  2. Select your branch from the drop down:
  1. Copy the terminal command line:
  1. Run it in your local environment via Terminal or Cmd.
  2. [Alternate] Click on the Download button under Download Installer to copy the entire project into your local directory.

Using the State Tool

  1. Run state activate <orgName/projectName> --branch <branchName>