A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
The following errors related to uncommitted changes occur during the Code Studio and Acquia CLI build process, even when your branch appears clean and git status reports no uncommitted files:
Acquia CLI:
In PushArtifactCommand.php line 100:
[Acquia\Cli\Exception\AcquiaCliException]
Pushing code was aborted because your local Git repository has uncommitted
changes. Please either commit, reset, or stash your changes via git.Code Studio:
You have committed files or directories that Acquia recommends gitignoring.
Please do not commit any of the following files or directories:
vendor, node_modules, docroot/composer.json, docroot/libraries, docroot/core, docroot/modules/contrib, docroot/themes/contrib, docroot/profiles/contribSimilar errors also occur during Acquia Pipelines builds when tracked build artifacts are present in your repository.
Such errors occur because these directories are committed in your codebase instead of being ignored in .gitignore, which prevents composer from adding them during the build. When you clone your repository to a new local directory and run composer install, git status shows several modified files.
To view the uncommitted files in your build log, add a before_script to the stage and run git status and git diff. Append the following block to the end of your .gitlab-ci.yml (for Code Studio) or equivalent configuration in your CI/CD build process:
"Create artifact from branch":
before_script:
- git status
- git diffTo resolve this issue, remove the tracked build directories from your repository:
docroot/core from your .gitignore file and commit the change with Git.docroot/core directory from your repository with git rm -r docroot/core and commit the change with Git.docroot/core back to your .gitignore file and commit the change with Git.Do not commit the docroot/core directory to your repository if you push build artifacts, because the build process generates these directories for you. Repeat this process for any other tracked files or directories listed in the recommended .gitignore file.
If you add a file or directory to .gitignore, Git ignores future untracked changes only. If a file or directory is already committed in your repository, Git continues to track it until you explicitly remove it from the repository.