Loading...

Pushing your application code into your Code Studio project

Pushing your application code into your Code Studio project

Prerequisites:

To push Drupal application code into your Code Studio project, use one of the following options:

Option 1: Pushing code through an existing application repository

Prerequisites:

  • For Drupal projects:
    • Composer to manage your application dependencies
    • PHP version 8.1, 8.2, 8.3 or 8.4
  • For Node.js projects:
    • Node.js version 18 or 20
    • Node Package Manager (NPM) to manage your application dependencies
  • Clone your application code on your local machine or on Cloud IDE.

To push an existing Drupal application repository into Code Studio:

  1. Navigate to the Drupal project directory on your local machine or on Cloud IDE:

    cd <git-repository-path>                                                   
  2. Add a new remote based on your requirement:
    • To use multiple remotes to manage the repository, add your repository to remote with the name codestudio:

      git remote add codestudio https://code.acquia.com/[gitlab-group]/[gitlab-project-name].git                                                                        
    • To use only Code Studio to manage the repository, add your repository to remote with the name origin:

      git remote add origin https://code.acquia.com/[gitlab-group]/[gitlab-project-name].git                                                                       
  3. Push the code from the project root to Code Studio:

    git add .
    git commit -m "Installed site"
    git push <REMOTE> <BRANCHNAME>                                                                
  4. Ensure that your development environment has the database and files for the installed site:

    acli push:db
    acli push:files
    

    Code Studio is ready to manage your site.

Option 2: Pushing code through a new Drupal or Node.js application repository

To generate a new Drupal application repository:

  1. Run the acli new command and select acquia/drupal-recommended-project.
  2. Navigate to your new directory by running the cd <directory name> command.
  3. Continue with the steps mentioned in Pushing code through an existing application repository.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation