Document a process for merging commits from upstream in D8

Created on 20 April 2016, about 9 years ago
Updated 25 March 2025, 4 months ago

TLDR: Read comments #11 and #12.

Updating core code from 8.0.6 to 8.1.0 results in numerous merging conflicts when tracking drupal.org upstream.

Example:

git remote -v
origin	git@git.xxxxxx:drupal/xxxx.git (fetch)
origin	git@git.xxxxxx:drupal/xxxx.git (push)
upstream	http://git.drupal.org/project/drupal.git (fetch)
upstream	http://git.drupal.org/project/drupal.git (push)
git fetch
git merge 8.1.0

Notice the massive amount of merge conflicts that ensue.

Automatic updates to drupal projects are now failing.

The process of updating a code base by extracting a downloaded tar.gz or zip, and reapplying changes manually in a development settings is far from best practice.

This is what version control is for.

The update procedure that professional teams have been using for years is as described here: https://www.drupal.org/node/803746#updatecore however this no longer works.

The only way now to update the core code in a project is to extract a tarball over the projects code and then manually reapply any updates and patches. Which is infeasible in a professional development environment, with automated ci/cd systems and update processes. Automatic update processes fail as manual intervention is now required, and git history for the core code is lost.

CONFLICT (modify/delete): vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php deleted in 9.1.0 and modified in HEAD. Version HEAD of vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php left in tree.
Removing vendor/symfony/http-kernel/Exception/ConflictHttpException.php
CONFLICT (modify/delete): vendor/jcalderonzumba/mink-phantomjs-driver/composer.json deleted in 8.1.0 and modified in HEAD. Version HEAD of vendor/jcalderonzumba/mink-phantomjs-driver/composer.json left in tree.
CONFLICT (modify/delete): vendor/jcalderonzumba/gastonjs/src/Client/poltergeist.js deleted in 8.1.0 and modified in HEAD. Version HEAD of vendor/jcalderonzumba/gastonjs/src/Client/poltergeist.js left in tree.
...
CONFLICT (content): Merge conflict in core/assets/vendor/ckeditor/lang/eu.js
CONFLICT (content): Merge conflict in core/assets/vendor/ckeditor/ckeditor.js
CONFLICT (content): Merge conflict in core/assets/vendor/ckeditor/CHANGES.md
CONFLICT (content): Merge conflict in core/CHANGELOG.txt
CONFLICT (content): Merge conflict in .htaccess                                  
🐛 Bug report
Status

Closed: outdated

Component

Correction/Clarification

Created by

🇦🇺Australia thursday_bw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024