Skip to content

Update the name of a deployment branch

Environments on WordPress VIP are set up to track a specific branch on the GitHub repo. For example, new production environments are set up to track a branch named production. Pushing any changes to this branch (via a push, merge, or rebase) triggers an automatic deployment to the production site

The deployment branch for any environment can be renamed or changed by completing each of the following required steps:

  1. Make sure the new branch exists.
  2. Create a request with VIP Support to update the branch that tracks to production. Include details about the environment and the name of the new branch that should replace the existing deployment branch.
  3. Wait for VIP Support to confirm that the branch and related configuration settings are complete.
  4. If the previous deployment branch was the repository’s default branch, update it to the new one by following these instructions.

If unused, the previous deployment branch can now be removed. To do this:

  1. Clone the wpcomvip GitHub repository to a local machine: 
    git clone git@github.com:wpcomvip/REPO_NAME.git
  2. Enter the folder on the local machine:
    cd REPO_NAME
  3. Delete the old branch:
    git push origin --delete old-branch-name
    git branch -d old-branch-name

Last updated: February 02, 2023