Skip to content

Commit 1b9d591

Browse files
committed
Update README and composer.json to prepare for packagist
1 parent 2637e3f commit 1b9d591

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

README.md

+19-18
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The Composer JSON Git Merge Driver provides a mechanism to more effectively merge
44
`composer.json` and `composer.lock` files that have been modified simultaneously
55
in separate branches / development histories. The [custom git merge driver][merge driver]
6-
is activated when the composer JSON files require a merge more complex than a
7-
simple "fast forward".
6+
is invoked when the composer JSON files require a merge more complex than a
7+
simple "fast forward."
88

99
## How it Works
1010

@@ -46,30 +46,29 @@ the real hash!
4646

4747
## Installation
4848

49-
The merge driver can be installed globally or per repo and activated globally or per repo,
49+
The merge driver can be installed globally or per repo and configured and activated globally or per repo,
5050
i.e. you can install the driver globally but only activate it on certain projects.
5151

52-
### 1. Download the merge driver.
52+
### 1. Install the merge driver on your system.
5353

54-
Use composer to install the driver into your repo or globally.
54+
Use composer to install the driver globally:
5555

5656
```sh
57-
$ composer require --dev balbuf/composer-git-merge-driver
57+
$ composer global require balbuf/composer-git-merge-driver
5858
```
5959

60-
or
60+
or just in a particular repo:
6161

6262
```sh
63-
$ composer global require balbuf/composer-git-merge-driver
63+
$ composer require --dev balbuf/composer-git-merge-driver
6464
```
6565

66-
### 2. Install the merge driver.
66+
Note that if you are installing the driver via the latter (per repo) method, this will be added
67+
to the repo's `composer.json` and thus will be installed as a dependency for all users of the repo.
68+
69+
### 2. Configure the merge driver with git.
6770

68-
The driver is installed by informing git of its existence via a [git config][git config]
69-
file. This example assumes that your path includes
70-
`~/.composer/vendor/bin` (for global installation) or `./vendor/bin`
71-
(for repo installation.) If that is not so, update the path to the
72-
driver on the `driver` line.
71+
The driver is made available for use by informing git of its existence via a [git config][git config] file:
7372

7473
```
7574
[merge "composer_json"]
@@ -88,13 +87,15 @@ By default, this allows you to edit the config file for the current repo, meanin
8887
is only installed locally to the repo. To edit the global config file for your user, append the
8988
`--global` flag; to edit the system-wide config file, append the `--system` flag.
9089

91-
Copy and paste the block above into the config file and save it. Be sure to update the path if
92-
you downloaded the file to somewhere other than `~/composer-git-merge-driver.php`. If you moved the
93-
file somewhere in your `$PATH`, you can simply replace the path with `composer-git-merge-driver`.
90+
Copy and paste the block above into the config file and save it. This example assumes that your `$PATH`
91+
includes [Composer's vendor bin][vendor bin] path (by default, `~/.composer/vendor/bin` for global
92+
installation or `./vendor/bin` for repo installation). If not, be sure to update your `$PATH` or
93+
add the appropriate path to the binary on the `driver` line.
9494

9595
For more information about git config files, refer to the [git documentation][git config].
9696

9797
[git config]: https://git-scm.com/docs/git-config
98+
[vendor bin]: https://getcomposer.org/doc/articles/vendor-binaries.md#can-vendor-binaries-be-installed-somewhere-other-than-vendor-bin-
9899

99100
### 3. Activate the merge driver.
100101

@@ -140,7 +141,7 @@ and the merge completed, you can avoid creating an additional commit by amending
140141
```sh
141142
$ composer update --lock
142143
$ git add composer.lock
143-
$ git commit --amend
144+
$ git commit --amend --no-edit
144145
```
145146

146147
## Additional Information

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "balbuf/composer-git-merge-driver",
3-
"description": "Merge composer.* files with conflicts.",
4-
"keywords": ["composer", "composer.lock", "composer.json", "git", "merge", "conflict"],
5-
"type": "library",
3+
"description": "Custom git merge driver to minimize merge conflicts in composer.json and composer.lock files.",
4+
"keywords": ["git", "merge", "driver", "conflict", "composer", "composer.lock", "composer.json"],
65
"bin": ["bin/composer-git-merge-driver"],
76
"authors": [{
87
"name": "Stephen Beemsterboer",
98
"homepage": "https://github.com/balbuf"
109
}],
10+
"license": "MIT",
1111
"require": {
1212
"php": ">=5.4"
1313
}

0 commit comments

Comments
 (0)