Skip to main content
Last Reviewed: December 12, 2022

Create a New Branch with Integrated Composer Code


The first step in the migration process is to create a new branch with Integrated Composer.

  1. Create a local clone of the Custom Upstream repository using the SSH URL and change the directory into the cloned repository:

    git clone $SSH_URL
    cd $REPOSITORY_NAME
  2. Add the Integrated Composer upstream as a second remote and fetch:

    git remote add ic https://github.com/pantheon-upstreams/drupal-composer-managed.git && git fetch ic
  3. Create a new composerify branch to work in:

    git checkout -b composerify
  4. On the composerify branch, use Git to remove all the files in the directory and commit the change. This is because you are going to completely replace the file structure and re-add customizations:

     git rm -rf * && git commit -m "Removing all files"
  5. Add and commit files from the Integrated Composer upstream:

    git checkout ic/main .
    git add $FILE_NAME
    git commit -m "Add and commit Integrated Composer files"
  6. Navigate to composer.json in your text editor and change the drupal/core-recommended version to the version of Drupal you are currently on:

    upstream-configuration/composer.json
    "drupal/core-recommended": "^9"
  7. Commit the change:

    git commit -am "Setting Drupal core version to ^9"