-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I followed the documentation in the official README.md:
- installed the Git merge driver as a project dependency by running
composer require --dev balbuf/composer-git-merge-driver - executed
git config -eand added
[merge "composer_json"]
name = composer JSON file merge driver
driver = composer-git-merge-driver %O %A %B %L %P
recursive = binary
- executed
vi .git/info/attributesand added
composer.json merge=composer_json
composer.lock merge=composer_json
- provoked a merge conflict in the composer.json and composer.lock by
git merge feature-123
The files were not automatically merged, but instead the following errors occurred:
composer-git-merge-driver .merge_file_y3x1cd .merge_file_eWfOGX .merge_file_58f6Qj 7 'composer.lock': composer-git-merge-driver: command not found
composer-git-merge-driver .merge_file_9ivoFp .merge_file_3yGI0E .merge_file_vBsoyF 7 'composer.json': composer-git-merge-driver: command not found
Auto-merging composer.json
CONFLICT (content): Merge conflict in composer.json
Auto-merging composer.lock
CONFLICT (content): Merge conflict in composer.lock
Automatic merge failed; fix conflicts and then commit the result.
I solved this issue by changing the Git config to:
[merge "composer_json"]
name = composer JSON file merge driver
driver = vendor/bin/composer-git-merge-driver %O %A %B %L %P
recursive = binary
Then I ran again git merge feature-123 and now the Git merge driver successfully did the job ❤️
Auto-merging composer.json
Auto-merging composer.lock
Just wanted to share this, maybe the README.md needs to get updated?